.tz-videos {
    --tz-video-navy: #073363;
    --tz-video-blue: #0765a1;
    --tz-video-cyan: #079bd0;
    --tz-video-teal: #079ba9;
    --tz-video-line: #cfe2ee;
    width: min(1200px, calc(100% - 40px));
    margin: 58px auto 72px;
    padding: 28px;
    color: var(--tz-video-navy);
    border: 1px solid #d9e8f1;
    border-radius: 26px;
    background: radial-gradient(circle at 4% 4%, rgba(7, 155, 169, .1), transparent 24%), linear-gradient(145deg, #fff 38%, #f4f9fc 100%);
    box-shadow: 0 22px 60px rgba(4, 51, 87, .1);
    box-sizing: border-box;
}

.tz-videos *, .tz-videos *::before, .tz-videos *::after { box-sizing: border-box; }
.tz-videos button { font: inherit; }

.tz-videos__top {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(310px, .9fr);
    align-items: stretch;
    gap: 20px;
    aspect-ratio: 2.69 / 1;
}

.tz-videos__player-shell {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #031c31;
    box-shadow: 0 12px 32px rgba(2, 35, 61, .18);
    width: 100%;
    height: 100%;
}

.tz-videos__player { display: block; width: 100%; height: 100%; border: 0; }

.tz-videos__playlist {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #c9dfec;
    border-radius: 18px;
    background: rgba(248, 252, 255, .96);
}

.tz-videos__playlist-heading {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 70px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tz-video-line);
}

.tz-videos__playlist-heading h2, .tz-videos__section-heading h2, .tz-videos__details h2 { margin: 0; color: var(--tz-video-navy); }
.tz-videos__playlist-heading h2 { font-size: 25px; font-weight: 800; line-height: 1; }

.tz-videos__playlist-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--tz-video-blue); }
.tz-videos__playlist-icon svg { width: 31px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tz-videos__count { color: #527088; font-size: 12px; font-weight: 700; white-space: nowrap; }

.tz-videos__playlist-list {
    min-height: 0;
    padding: 6px 9px 10px;
    overflow-y: auto;
    scrollbar-color: #73bdcf transparent;
    scrollbar-width: thin;
}

.tz-videos__playlist-list::-webkit-scrollbar { width: 6px; }
.tz-videos__playlist-list::-webkit-scrollbar-thumb { border-radius: 20px; background: #73bdcf; }

.tz-videos__playlist-item {
    position: relative;
    display: grid;
    grid-template-columns: 13px 92px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 8px;
    color: var(--tz-video-navy);
    border: 0;
    border-bottom: 1px solid var(--tz-video-line);
    border-radius: 10px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.tz-videos__playlist-item:last-child { border-bottom-color: transparent; }
.tz-videos__playlist-item:hover { background: #eaf6fb; }
.tz-videos__playlist-item.is-active { background: linear-gradient(100deg, #dff3fa, #edf8fc); }
.tz-videos__playlist-item img { display: block; width: 92px; height: 58px; border-radius: 8px; object-fit: cover; }

.tz-videos__play-marker { width: 0; height: 0; margin-left: 2px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 10px solid transparent; }
.tz-videos__playlist-item.is-active .tz-videos__play-marker { border-left-color: var(--tz-video-blue); }
.tz-videos__playlist-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.tz-videos__playlist-copy strong { display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 750; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tz-videos__playlist-copy small { color: #58748d; font-size: 12px; }

.tz-videos__details { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 14px 2px 8px; }
.tz-videos__details-copy { min-width: 0; flex: 1; }
.tz-videos__details h2 { font-size: clamp(25px, 2.5vw, 34px); font-weight: 800; line-height: 1.15; }
.tz-videos__meta { margin: 7px 0 0; color: #536e86; font-size: 14px; }
.tz-videos__description { max-width: 850px; margin: 11px 0 0; color: #314f69; font-size: 16px; line-height: 1.55; }

.tz-videos__share-wrap { display: flex; min-width: 132px; flex-direction: column; align-items: flex-end; gap: 5px; padding-top: 4px; }
.tz-videos__share { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; color: var(--tz-video-blue); border: 0; border-radius: 999px; background: transparent; font-weight: 700; cursor: pointer; }
.tz-videos__share:hover { background: #e8f5fa; }
.tz-videos__share svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tz-videos__share-feedback { min-height: 17px; color: var(--tz-video-teal); font-size: 12px; font-weight: 700; }

.tz-videos__section-heading { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 8px; }
.tz-videos__section-heading h2 { font-size: 20px; font-weight: 800; white-space: nowrap; }
.tz-videos__section-heading > span { width: 100%; height: 1px; background: var(--tz-video-line); }

.tz-videos__carousel-controls { display: flex; flex: 0 0 auto; gap: 8px; }
.tz-videos__carousel-controls button { display: grid; width: 40px; height: 40px; padding: 0; place-items: center; color: var(--tz-video-blue); border: 1px solid #bcd8e7; border-radius: 50%; background: #fff; box-shadow: 0 5px 15px rgba(4, 51, 87, .09); cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease; }
.tz-videos__carousel-controls button:hover { color: #fff; border-color: var(--tz-video-blue); background: var(--tz-video-blue); transform: translateY(-2px); }
.tz-videos__carousel-controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tz-videos__carousel { min-width: 0; overflow: hidden; }
.tz-videos__cards { display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tz-videos__cards::-webkit-scrollbar { display: none; }

.tz-videos__card {
    min-width: 0;
    flex: 0 0 calc((100% - 56px) / 5);
    scroll-snap-align: start;
    padding: 0;
    color: var(--tz-video-navy);
    border: 0;
    border-radius: 13px;
    outline: 3px solid transparent;
    outline-offset: 3px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: transform .2s ease, outline-color .2s ease;
}

.tz-videos__card:hover { transform: translateY(-3px); }
.tz-videos__card.is-active { outline-color: var(--tz-video-cyan); }
.tz-videos__thumbnail { position: relative; display: block; overflow: hidden; border-radius: 12px; background: #d8e9f2; aspect-ratio: 16 / 9; }
.tz-videos__thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.tz-videos__card:hover img { transform: scale(1.035); }
.tz-videos__thumbnail small { position: absolute; right: 8px; bottom: 7px; padding: 3px 7px; color: #fff; border-radius: 5px; background: rgba(1, 20, 34, .86); font-size: 12px; }

.tz-videos__thumbnail i { position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 6px 18px rgba(0, 38, 65, .22); opacity: 0; transform: translate(-50%, -50%) scale(.8); transition: opacity .2s ease, transform .2s ease; }
.tz-videos__thumbnail i::after { position: absolute; top: 50%; left: 54%; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid var(--tz-video-blue); content: ''; transform: translate(-50%, -50%); }
.tz-videos__card:hover .tz-videos__thumbnail i, .tz-videos__card.is-active .tz-videos__thumbnail i { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.tz-videos__card > strong { display: -webkit-box; margin-top: 6px; overflow: hidden; font-size: 14px; font-weight: 750; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tz-videos button:focus-visible { outline: 3px solid #22b4cf; outline-offset: 3px; }

/* Desktop médio: o player permanece em 16:9 e a playlist acompanha sua altura. */
@media (min-width: 1024px) and (max-width: 1439px) {
    .tz-sm-videos > .tz-sm-section-heading {
        max-width: 900px;
        margin: 0 auto 12px;
        padding-top: 28px;
    }

    .tz-sm-videos .tz-videos {
        margin-inline: auto;
        padding: 0 16px;
    }

    .tz-videos {
        width: min(900px, calc(100% - 32px));
    }

    .tz-videos__top {
        grid-template-columns: minmax(0, 16fr) minmax(0, 9fr);
        grid-template-rows: minmax(0, 1fr);
        gap: 16px;
        aspect-ratio: 2.82 / 1;
    }

    .tz-videos__player-shell { height: 100%; aspect-ratio: 16 / 9; }
    .tz-videos__playlist { min-height: 0; height: 100%; max-height: 100%; }
    .tz-videos__playlist-heading { min-height: 48px; padding: 8px 12px; }
    .tz-videos__playlist-heading h2 { font-size: 21px; }
    .tz-videos__playlist-list { padding: 4px 7px 7px; }
    .tz-videos__playlist-item {
        grid-template-columns: 10px 76px minmax(0, 1fr);
        gap: 7px;
        padding: 5px 5px;
    }
    .tz-videos__playlist-item img { width: 76px; height: 43px; }
    .tz-videos__playlist-copy strong { font-size: 13px; }

    .tz-videos__details { gap: 12px; padding: 8px 2px 2px; }
    .tz-videos__details h2 { font-size: clamp(21px, 2vw, 27px); }
    .tz-videos__description { margin-top: 6px; font-size: 14px; line-height: 1.4; }
    .tz-videos__share-wrap { padding-top: 0; }
    .tz-videos__share { padding: 6px 9px; }
    .tz-videos__share-feedback { min-height: 0; }

    .tz-videos__section-heading { margin-bottom: 4px; }
    .tz-videos__carousel-controls button { width: 30px; height: 30px; }
    .tz-videos__cards { gap: 10px; }
    .tz-videos__card { flex-basis: calc((100% - 50px) / 6); }
    .tz-videos__card > strong { margin-top: 4px; font-size: 12px; }
}

@media (max-width: 980px) {
    .tz-videos { width: min(760px, calc(100% - 32px)); }
    .tz-videos__top { grid-template-columns: 1fr; aspect-ratio: auto; }
    .tz-videos__player-shell { height: auto; aspect-ratio: 16 / 9; }
    .tz-videos__playlist { height: auto; max-height: 370px; }
    .tz-videos__card { flex-basis: calc((100% - 20px) / 2); }
}

@media (max-width: 600px) {
    .tz-videos { width: calc(100% - 24px); margin-top: 36px; margin-bottom: 50px; padding: 14px; border-radius: 18px; }
    .tz-videos__player-shell, .tz-videos__playlist { border-radius: 14px; }
    .tz-videos__playlist-heading { min-height: 60px; padding: 12px 14px; }
    .tz-videos__playlist-heading h2 { font-size: 22px; }
    .tz-videos__playlist-item { grid-template-columns: 12px 84px minmax(0, 1fr); gap: 8px; padding-right: 5px; padding-left: 5px; }
    .tz-videos__playlist-item img { width: 84px; height: 53px; }
    .tz-videos__details { flex-direction: column; gap: 8px; }
    .tz-videos__details h2 { font-size: 25px; }
    .tz-videos__share-wrap { min-width: 0; align-items: flex-start; }
    .tz-videos__section-heading { align-items: center; gap: 10px; }
    .tz-videos__section-heading h2 { font-size: 18px; white-space: normal; }
    .tz-videos__section-heading > span { display: none; }
    .tz-videos__carousel-controls { margin-left: auto; }
    .tz-videos__carousel-controls button { width: 36px; height: 36px; }
    .tz-videos__cards { gap: 12px; }
    .tz-videos__card { flex-basis: 100%; }
    .tz-videos__card > strong { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .tz-videos__cards { scroll-behavior: auto; }
}
