
.htvg {
    --ht-blue: #072d75;
    --ht-blue-2: #0b4cc2;
    --ht-yellow: #ffc400;
    --ht-ink: #071b40;
    --ht-muted: #6b7280;
    --ht-border: #e7eaf0;
    --ht-card: #ffffff;
    font-family: inherit;
    color: var(--ht-ink);
}

.htvg * { box-sizing: border-box; }

.htvg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 0 28px;
}

.htvg-tab {
    appearance: none;
    border: 1.5px solid rgba(7,45,117,.35);
    background: #fff;
    color: var(--ht-blue);
    border-radius: 999px;
    padding: 9px 18px;
    font: inherit;
    font-weight: 800;
    letter-spacing: .03em;
    cursor: pointer;
    transition: .2s ease;
}

.htvg-tab:hover,
.htvg-tab:focus-visible {
    border-color: var(--ht-blue);
    outline: none;
    transform: translateY(-1px);
}

.htvg-tab.is-active {
    background: var(--ht-yellow);
    border-color: var(--ht-yellow);
    color: #102a5a;
    box-shadow: 0 6px 16px rgba(255,196,0,.22);
}

.htvg-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, .7fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 34px;
}

.htvg-player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(7,27,64,.16);
}

.htvg-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.htvg-featured-info {
    background: linear-gradient(145deg, #fff 0%, #f7f9fc 100%);
    border: 1px solid var(--ht-border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(7,27,64,.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.htvg-featured-info h2 {
    margin: 14px 0 10px;
    font-size: clamp(22px, 2vw, 34px);
    line-height: 1.05;
    color: var(--ht-ink);
}

.htvg-badge {
    display: inline-flex;
    align-self: flex-start;
    background: var(--ht-blue-2);
    color: #fff;
    border-radius: 5px;
    padding: 5px 9px;
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .05em;
}

.htvg-date,
.htvg-source {
    margin: 0 0 10px;
    color: var(--ht-muted);
    font-size: 14px;
}

.htvg-youtube-link {
    margin-top: 8px;
    font-weight: 800;
    color: var(--ht-blue-2);
    text-decoration: none;
}

.htvg-youtube-link:hover { text-decoration: underline; }

.htvg-heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--ht-yellow);
}

.htvg-heading-row h3 {
    margin: 0;
    color: var(--ht-blue);
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.htvg-count {
    color: var(--ht-muted);
    font-size: 13px;
    font-weight: 700;
}

.htvg-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.htvg-card {
    min-width: 0;
    background: var(--ht-card);
    border: 1px solid var(--ht-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(7,27,64,.07);
    transition: transform .2s ease, box-shadow .2s ease;
}

.htvg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(7,27,64,.12);
}

.htvg-card[hidden] { display: none !important; }

.htvg-card-button {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.htvg-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0a1b3e;
}

.htvg-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.htvg-card:hover .htvg-thumb img { transform: scale(1.035); }

.htvg-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.htvg-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
    z-index: 2;
}

.htvg-play::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 16px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid var(--ht-blue);
}

.htvg-card-body {
    padding: 14px 15px 16px;
}

.htvg-card-body time {
    display: block;
    color: var(--ht-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.htvg-card-body h4 {
    margin: 0 0 9px;
    font-size: 15px;
    line-height: 1.22;
    color: var(--ht-ink);
}

.htvg-card-source {
    color: var(--ht-blue-2);
    font-size: 12px;
    font-weight: 800;
}

.htvg-no-results,
.htvg-empty,
.htvg-admin-warning {
    padding: 18px 20px;
    border-radius: 10px;
    background: #f7f9fc;
    border: 1px solid var(--ht-border);
}

.htvg-admin-warning {
    border-left: 4px solid var(--ht-yellow);
}

@media (max-width: 1050px) {
    .htvg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .htvg-featured { grid-template-columns: minmax(0, 1.45fr) minmax(240px, .75fr); }
}

@media (max-width: 780px) {
    .htvg-featured { grid-template-columns: 1fr; }
    .htvg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .htvg-featured-info { padding: 20px; }
    .htvg-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
        scrollbar-width: thin;
    }
    .htvg-tab { flex: 0 0 auto; }
}

@media (max-width: 520px) {
    .htvg-grid { grid-template-columns: 1fr; }
    .htvg-heading-row { align-items: center; }
}


/* Home / latest videos */
.htvg-latest {
    background: #fff;
}

.htvg-latest-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 18px;
}

.htvg-latest-head h3 {
    margin: 3px 0 0;
    color: var(--ht-blue);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .02em;
}


.htvg-latest-all {
    color: var(--ht-blue-2);
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.htvg-latest-all:hover { text-decoration: underline; }

.htvg-latest-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr);
    gap: 22px;
    align-items: stretch;
}

.htvg-latest-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.htvg-latest-maintext {
    padding-top: 14px;
}

.htvg-latest-maintext h4 {
    margin: 10px 0 6px;
    color: var(--ht-ink);
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.1;
}

.htvg-latest-maintext p {
    margin: 0;
    color: var(--ht-muted);
    font-size: 13px;
}

.htvg-latest-list {
    display: grid;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 12px;
    height: 100%;
    min-height: 0;
}

.htvg-latest-item {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--ht-border);
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.htvg-latest-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(7,27,64,.10);
}

.htvg-latest-thumb {
    position: relative;
    display: block;
    height: 100%;
    min-height: 0;
    background: #0a1b3e;
    overflow: hidden;
}

.htvg-latest-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.htvg-play-small {
    width: 38px;
    height: 38px;
}

.htvg-play-small::after {
    left: 16px;
    top: 12px;
    border-top-width: 7px;
    border-bottom-width: 7px;
    border-left-width: 11px;
}

.htvg-latest-itemtext {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 9px 12px 9px 0;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.htvg-latest-date {
    color: var(--ht-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.htvg-latest-itemtext strong {
    color: var(--ht-ink);
    font-size: 14px;
    line-height: 1.2;
}

@media (max-width: 900px) {
    .htvg-latest-layout { grid-template-columns: 1fr; }
    .htvg-latest-list {
        grid-template-columns: repeat(2, minmax(0,1fr));
        grid-template-rows: none;
        height: auto;
    }
    .htvg-latest-item {
        display: block;
    }
    .htvg-latest-itemtext {
        padding: 10px 12px 12px;
    }
}

@media (max-width: 650px) {
    .htvg-latest-head { align-items: flex-start; flex-direction: column; }
    .htvg-latest-list {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        height: auto;
    }
    .htvg-latest-item {
        display: grid;
        grid-template-columns: 125px minmax(0,1fr);
    }
}


.htvg-latest-itemtext strong {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 901px) {
    .htvg-latest-layout {
        /* The right column follows the total natural height of the left column. */
        grid-auto-rows: 1fr;
    }

    .htvg-latest-list {
        align-self: stretch;
    }
}

@media (max-width: 900px) {
    .htvg-latest-thumb {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .htvg-latest-item {
        height: auto;
    }
}

/* =========================================================
   v0.6 · LIVE / DIRETTE / HIGHLIGHTS
   ========================================================= */
.htvg-v06 { --ht-live:#ed1c24; }
.htvg-filter-row {
    display:grid;
    grid-template-columns:190px minmax(0,1fr);
    gap:18px;
    align-items:center;
    padding:12px 0;
    border-bottom:1px solid var(--ht-border);
}
.htvg-filter-row-category { margin-bottom:20px; }
.htvg-filter-label {
    color:var(--ht-blue);
    font-family:"Barlow Condensed",sans-serif;
    font-size:15px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.htvg-v06 .htvg-tabs { margin:0; justify-content:flex-start; }
.htvg-v06 .htvg-tab { min-width:82px; }
.htvg-v06 .htvg-category-tab { min-width:58px; }
.htvg-live-zone { margin:4px 0 28px; }
.htvg-live-heading {
    display:flex; align-items:center; gap:9px; margin:0 0 12px;
    color:var(--ht-live); font-size:15px; text-transform:uppercase;
}
.htvg-live-heading [data-live-count] { color:var(--ht-muted); text-transform:none; font-weight:600; }
.htvg-live-dot { width:9px; height:9px; border-radius:50%; background:var(--ht-live); animation:htvgPulse 1.1s infinite; }
@keyframes htvgPulse { 50%{opacity:.25; transform:scale(.75);} }
.htvg-live-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.htvg-live-grid.is-single { grid-template-columns:minmax(0,1fr); }
.htvg-live-grid.is-single .htvg-live-card { max-width:100%; }
.htvg-live-card { min-width:0; border:1px solid var(--ht-border); border-radius:12px; overflow:hidden; background:#fff; box-shadow:0 10px 28px rgba(7,27,64,.08); }
.htvg-live-player-wrap { position:relative; aspect-ratio:16/9; background:#071a37; }
.htvg-live-player { width:100%; height:100%; border:0; display:block; }
.htvg-live-badge {
    position:absolute; top:12px; left:12px; z-index:4; display:inline-flex; align-items:center; gap:7px;
    padding:7px 11px; border-radius:5px; background:var(--ht-live); color:#fff;
    font-family:"Barlow Condensed",sans-serif; font-weight:800; font-size:14px; line-height:1;
}
.htvg-live-badge span { width:7px; height:7px; border-radius:50%; background:#fff; animation:htvgPulse 1.1s infinite; }
.htvg-live-category { position:absolute; top:12px; right:12px; z-index:4; }
.htvg-live-card-body { padding:14px 16px 16px; }
.htvg-live-card-body h3 { margin:0 0 5px; color:var(--ht-ink); font-size:20px; line-height:1.08; }
.htvg-live-card-body p { margin:0; color:var(--ht-muted); font-size:13px; }
.htvg-home-live-player { position:relative; aspect-ratio:16/9; overflow:hidden; border-radius:14px; background:#071a37; }
.htvg-home-live-player iframe { width:100%; height:100%; display:block; border:0; }
.htvg-home-dynamic h3 { margin:15px 0 6px; color:var(--ht-ink); font-size:27px; line-height:1.08; }
.htvg-home-dynamic p { margin:0; color:var(--ht-muted); }
@media(max-width:780px){
    .htvg-filter-row{grid-template-columns:1fr;gap:8px;}
    .htvg-live-grid{grid-template-columns:1fr;}
}
