/* ============================================================
   HAMAC — video library (vd-)
   Loaded on /videos/, category hubs and video detail pages.
   ============================================================ */

.pg-hero--video {
    background-image: url("/uploads/videos/covers/hero.jpg");
    background-position: center 55%;
    min-height: 300px;
}

.pg-hero--video-hub {
    min-height: 360px;
}

.pg-crumb strong {
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------- detail layout ---------------- */
.vd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: start;
}

.vd-main {
    min-width: 0;
}

.vd-aside {
    position: sticky;
    top: 104px;
    display: grid;
    gap: 16px;
    min-width: 0;
}

.vd-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #04121f;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(6, 23, 41, .18);
}

.vd-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.vd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 6px;
}

.vd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--pg-navy-800);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .02em;
}

.vd-chip--ghost {
    background: #eef3f9;
    color: var(--pg-navy-800);
}

.vd-chip--link {
    background: #fff;
    color: var(--pg-navy-800);
    border: 1px solid var(--pg-line);
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease;
}

.vd-chip--link:hover {
    border-color: var(--pg-gold);
    color: var(--pg-gold-deep);
}

.vd-h2 {
    margin: 34px 0 14px;
    padding-left: 14px;
    border-left: 3px solid var(--pg-gold);
    font-size: 22px;
    line-height: 1.35;
    font-weight: 800;
    color: var(--pg-navy-800);
    text-transform: none;
}

.vd-main p {
    margin: 0 0 14px;
    font-size: 15.5px;
    line-height: 1.85;
    color: #3b4d64;
}

.vd-points {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.vd-points li {
    position: relative;
    padding: 7px 0 7px 24px;
    font-size: 15.5px;
    line-height: 1.75;
    color: #3b4d64;
    border-bottom: 1px dashed #e6edf6;
}

.vd-points li:last-child {
    border-bottom: 0;
}

.vd-points li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 18px;
    width: 7px;
    height: 7px;
    border-radius: 1px;
    background: var(--pg-gold);
}

.vd-specs {
    overflow-x: auto;
    border: 1px solid #e7edf5;
    border-radius: 10px;
}

.vd-specs table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.vd-specs tbody tr > th,
.vd-specs tbody tr > td {
    background: #fff;
}

.vd-specs tbody tr:nth-child(even) > th,
.vd-specs tbody tr:nth-child(even) > td {
    background: #f7fafd;
}

.vd-specs th,
.vd-specs td {
    padding: 11px 14px;
    border-bottom: 1px solid #eff3f8;
    text-align: left;
    vertical-align: top;
    line-height: 1.65;
}

.vd-specs th {
    width: 168px;
    font-weight: 700;
    color: var(--pg-navy-800);
    white-space: nowrap;
}

.vd-specs td {
    color: #3b4d64;
}

.vd-specs tr:last-child th,
.vd-specs tr:last-child td {
    border-bottom: 0;
}

/* ---------------- sidebar cards ---------------- */
.vd-card {
    background: #fff;
    border: 1px solid var(--pg-line);
    border-radius: 12px;
    padding: 20px;
}

.vd-card h3 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pg-navy-800);
}

.vd-card p {
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--pg-muted);
}

.vd-card--cta {
    background: linear-gradient(160deg, var(--pg-navy-900) 0%, var(--pg-navy-700) 100%);
    border-color: transparent;
}

.vd-card--cta h3 {
    color: #fff;
}

.vd-card--cta p {
    color: rgba(255, 255, 255, .74);
}

.vd-card--cta .pg-btn {
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.vd-links {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.vd-links li {
    border-bottom: 1px solid #eff3f8;
}

.vd-links li:last-child {
    border-bottom: 0;
}

.vd-links a {
    display: block;
    padding: 9px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #46596f;
}

.vd-links a:hover {
    color: var(--pg-gold-deep);
}

.vd-more {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pg-navy-800);
    border-bottom: 1px solid var(--pg-gold);
}

/* ---------------- grid & cards ---------------- */
.vd-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.vd-vcard {
    display: block;
    background: #fff;
    border: 1px solid #e6edf6;
    border-radius: 12px;
    overflow: hidden;
    color: inherit;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.vd-vcard:hover {
    transform: translateY(-3px);
    border-color: #d6e2ef;
    box-shadow: 0 16px 30px rgba(8, 30, 55, .1);
}

.vd-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #0b1c30;
    overflow: hidden;
}

.vd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease, opacity .3s ease;
}

.vd-vcard:hover .vd-thumb img {
    transform: scale(1.05);
    opacity: .88;
}

.vd-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    background: rgba(245, 179, 1, .95);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
    transition: transform .2s ease, background .2s ease;
}

.vd-play::after {
    content: "";
    position: absolute;
    left: 17px;
    top: 13px;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #0b1c30;
}

.vd-vcard:hover .vd-play {
    transform: scale(1.08);
    background: #ffc528;
}

.vd-vbody {
    display: block;
    padding: 13px 15px 15px;
}

.vd-vbody strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--pg-navy-800);
}

.vd-vbody em {
    display: block;
    margin-top: 7px;
    font-style: normal;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #93a3b7;
}

/* ---------------- filter bar ---------------- */
.vd-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--pg-line);
    border-radius: 12px;
}

.vd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vd-chipbtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid #e2eaf4;
    border-radius: 999px;
    background: #f8fafd;
    color: #4a5d73;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
}

.vd-chipbtn span {
    font-size: 11px;
    font-weight: 700;
    color: #9aabc0;
}

.vd-chipbtn:hover {
    border-color: #cfdcec;
    color: var(--pg-navy-800);
}

.vd-chipbtn.is-on {
    background: var(--pg-navy-800);
    border-color: var(--pg-navy-800);
    color: #fff;
}

.vd-chipbtn.is-on span {
    color: rgba(255, 255, 255, .6);
}

.vd-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    padding: 8px 14px;
    border: 1px solid #e2eaf4;
    border-radius: 999px;
    background: #fff;
}

.vd-search span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9aabc0;
}

.vd-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    font-size: 13.5px;
    color: var(--pg-navy-800);
    background: transparent;
}

.vd-empty {
    margin: 30px 0;
    text-align: center;
    color: var(--pg-muted);
}

/* ---------------- category tiles ---------------- */
.vd-cats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.vd-cat {
    position: relative;
    display: block;
    padding: 20px 18px;
    background: #fff;
    border: 1px solid var(--pg-line);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.vd-cat::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--pg-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.vd-cat:hover {
    transform: translateY(-2px);
    border-color: #d8e3f0;
    box-shadow: 0 12px 24px rgba(8, 30, 55, .08);
}

.vd-cat:hover::after {
    transform: scaleX(1);
}

.vd-cat__n {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    color: var(--pg-gold-deep);
}

.vd-cat strong {
    display: block;
    font-size: 15px;
    line-height: 1.45;
    color: var(--pg-navy-800);
}

.vd-cat em {
    display: block;
    margin-top: 8px;
    font-style: normal;
    font-size: 12.5px;
    color: var(--pg-muted);
}

.vd-cathead {
    max-width: 880px;
    margin-bottom: 26px;
}

.vd-cathead p {
    margin: 10px 0 0;
    font-size: 15.5px;
    line-height: 1.85;
    color: #3b4d64;
}

/* ---------------- responsive ---------------- */
@media screen and (max-width: 1180px) {
    .vd-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vd-cats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 1000px) {
    .vd-layout {
        grid-template-columns: 1fr;
    }

    .vd-aside {
        position: static;
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 760px) {
    .pg-hero--video {
        min-height: 260px;
    }

    .vd-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .vd-vbody {
        padding: 11px 12px 13px;
    }

    .vd-vbody strong {
        font-size: 13px;
        min-height: 39px;
    }

    .vd-play {
        width: 38px;
        height: 38px;
        margin: -19px 0 0 -19px;
    }

    .vd-play::after {
        left: 14px;
        top: 11px;
        border-width: 8px 0 8px 13px;
    }

    .vd-aside {
        grid-template-columns: 1fr;
    }

    .vd-h2 {
        font-size: 19px;
        margin-top: 28px;
    }

    .vd-bar {
        padding: 12px;
    }

    .vd-search {
        min-width: 0;
        width: 100%;
    }

    .vd-chips {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .vd-chipbtn {
        flex: 0 0 auto;
    }

    .vd-cats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .vd-specs th {
        width: 120px;
        white-space: normal;
    }

    .vd-player {
        border-radius: 10px;
    }
}

body.videos .pg-sec-head h2,
body.videos .pg-faq summary {
    text-transform: none;
}

@media screen and (max-width: 760px) {
    .pg-crumb .sep:nth-of-type(2),
    .pg-crumb a:nth-of-type(2) {
        display: none;
    }
}
