/* ==========================================================================
   Vídeos · megabolsa.com
   ========================================================================== */

/* Tokens de Carfy (dirección "Editorial claro").
   Se conservan los nombres de variable del diseño original para no tener
   que tocar las 1.400 líneas de componentes: solo cambia la paleta. */
:root {
    --navy: #0b0f14;          /* ink-900: tinta principal y pie */
    --navy-2: #151c25;        /* ink-800 */
    --blue: #e10600;          /* rojo de marca: enlaces y acciones */
    --blue-dark: #b30500;     /* brand-600 */
    --blue-soft: #fff1f0;     /* brand-soft */
    --ink: #0b0f14;
    --text: #2a3441;          /* ink-700 */
    --muted: #5b6b7c;         /* ink-500 */
    --line: #dde4eb;          /* ink-200 */
    --bg: #ffffff;
    --bg-2: #f5f7fa;          /* paper-2: secciones alternas */
    --white: #ffffff;
    --green: #0b6e4f;
    --green-soft: #e6f4ef;
    --red: #b30500;
    --red-soft: #fff1f0;
    --radius: 12px;
    --shadow: 0 8px 24px rgb(11 15 20 / 0.08), 0 2px 6px rgb(11 15 20 / 0.04);
    --shadow-sm: 0 1px 2px rgb(11 15 20 / 0.06), 0 1px 3px rgb(11 15 20 / 0.04);

    /* Tipografía de Carfy */
    --display: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: var(--blue-dark);
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--ink);
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

p {
    margin: 0;
}

button {
    font: inherit;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
}

.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;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    background: var(--white);
    color: var(--navy);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 12px;
}

:focus-visible {
    outline: 3px solid #e10600;
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px;
}

.container--narrow {
    max-width: 980px;
}

/* --------------------------------------------------------------------------
   Cabecera
   -------------------------------------------------------------------------- */

.site-header {
    background: var(--navy);
}

.header-main {
    background: var(--navy);
}

.header-main__inner {
    display: flex;
    align-items: center;
    gap: 34px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    color: var(--white);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
    white-space: nowrap;
}

.brand:hover {
    color: var(--white);
}

.brand__tld {
    color: #c9d3dd;
    font-weight: 700;
}

.search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 680px;
    height: 46px;
    background: var(--white);
    border-radius: 6px;
    overflow: hidden;
}

.search__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    padding: 0 18px;
    color: var(--ink);
    font-size: 15px;
    background: transparent;
}

.search__input::placeholder {
    color: #8697a8;
}

.search__input:focus {
    outline: none;
}

.search__btn {
    display: grid;
    place-items: center;
    width: 54px;
    height: 100%;
    border: 0;
    background: var(--white);
    color: var(--navy);
    cursor: pointer;
}

.search__btn:hover {
    background: var(--blue-soft);
    color: var(--blue);
}

.main-nav {
    background: var(--blue);
}

.main-nav__inner {
    display: flex;
    align-items: stretch;
    gap: 30px;
    min-height: 50px;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav__inner::-webkit-scrollbar {
    display: none;
}

.main-nav__link {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    border-top: 3px solid transparent;
}

.main-nav__link:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.55);
}

.main-nav__blog {
    margin-left: auto;
    padding-left: 6px;
    border-bottom-color: var(--white);
}

.main-nav__blog:hover {
    border-bottom-color: var(--white);
}

/* --------------------------------------------------------------------------
   Cabecera de página
   -------------------------------------------------------------------------- */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 22px 0 10px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb a {
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--blue);
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0 18px;
}

.page-head__title {
    font-size: 34px;
}

.page-head__sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 15.5px;
}

.page-head__count {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn--primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
}

.btn--primary:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
    color: #ffffff;
}

.btn--soft {
    background: var(--blue-soft);
    border-color: var(--blue-soft);
    color: var(--blue);
}

.btn--soft:hover {
    background: #ffe0de;
    color: var(--blue-dark);
}

.btn--ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--text);
}

.btn--ghost:hover {
    background: #f5f7fa;
    color: var(--ink);
}

.btn--danger {
    background: var(--red-soft);
    border-color: var(--red-soft);
    color: var(--red);
}

.btn--danger:hover {
    background: #ffdcd9;
    color: var(--red);
}

.btn--sm {
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.btn--block {
    display: flex;
    width: 100%;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cv-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0b0f14;
    overflow: hidden;
}

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

.cv-player__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.cv-player__img.is-missing {
    opacity: 0;
}

.cv-player__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 15, 20, 0.04) 40%, rgba(11, 15, 20, 0.42) 100%);
    pointer-events: none;
}

.cv-player__hit {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.cv-play {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--navy);
    box-shadow: 0 10px 30px rgba(11, 15, 20, 0.35);
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.cv-play svg {
    margin-left: 4px;
}

.cv-player__hit:hover .cv-play {
    transform: scale(1.07);
    background: var(--blue);
    color: #ffffff;
}

.hero__body {
    padding: 20px 24px 18px;
}

.hero__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.hero__title {
    font-size: 28px;
    line-height: 1.22;
}

.hero__title a {
    color: var(--ink);
}

.hero__title a:hover {
    color: var(--blue);
}

.hero__desc {
    margin-top: 8px;
    max-width: 900px;
    color: var(--muted);
    font-size: 15.5px;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13.5px;
}

.hero__duration {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.hero__link {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hero__link:hover {
    color: var(--blue-dark);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--navy);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.badge--solid {
    background: var(--blue-soft);
    color: var(--blue);
}

.dot {
    color: #8697a8;
}

/* --------------------------------------------------------------------------
   Categorías
   -------------------------------------------------------------------------- */

.chips {
    display: flex;
    gap: 10px;
    margin: 26px 0 0;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
    border-color: #c3ced9;
    color: var(--blue);
}

.chip.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: #ffffff;
}

.chip__count {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.chip.is-active .chip__count {
    color: #ffb3ae;
}

/* --------------------------------------------------------------------------
   Parrilla
   -------------------------------------------------------------------------- */

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 26px 0 16px;
}

.section-head__title {
    font-size: 21px;
}

.section-head__page,
.section-head__link {
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
}

.section-head__link:hover {
    color: var(--blue);
}

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

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

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

.card__link {
    display: block;
    color: inherit;
}

.card__link:hover {
    color: inherit;
}

.card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #151c25;
    overflow: hidden;
}

.card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card__img {
    transform: scale(1.045);
}

.card__img.is-missing {
    opacity: 0;
}

.card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 15, 20, 0.12) 0%, rgba(11, 15, 20, 0.34) 100%);
    pointer-events: none;
}

.card__play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--navy);
    box-shadow: 0 6px 18px rgba(11, 15, 20, 0.28);
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.card__play svg {
    margin-left: 3px;
}

.card:hover .card__play {
    transform: scale(1.1);
    background: var(--blue);
    color: #ffffff;
}

.card .badge {
    position: absolute;
    left: 10px;
    top: 10px;
}

.card__duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 3px 7px;
    border-radius: 5px;
    background: rgba(11, 15, 20, 0.82);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.card__body {
    padding: 14px 16px 17px;
}

.card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    font-size: 16.5px;
    line-height: 1.34;
}

.card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card__tag {
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 11.5px;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Ficha de vídeo
   -------------------------------------------------------------------------- */

.video-detail {
    margin-top: 8px;
}

.cv-player--detail {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.video-detail__head {
    padding: 22px 0 4px;
}

.video-detail__badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.video-detail__duration {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.video-detail__title {
    font-size: 32px;
    line-height: 1.18;
}

.video-detail__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13.5px;
}

.video-detail__desc {
    margin-top: 16px;
    max-width: 860px;
    color: var(--text);
    font-size: 15.5px;
    line-height: 1.7;
}

.video-detail__summary {
    margin-top: 18px;
    max-width: 860px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent, #e10600);
    border-radius: 10px;
    background: #f5f7fa;
    color: var(--text);
    font-size: 15.5px;
    line-height: 1.7;
}

.video-detail__summary-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.video-detail__summary p {
    margin: 0;
}

.related {
    margin-top: 38px;
}

/* --------------------------------------------------------------------------
   Transcripción
   -------------------------------------------------------------------------- */

.transcript {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.hero .transcript {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
}

.transcript__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.transcript__summary::-webkit-details-marker {
    display: none;
}

.transcript__label {
    color: var(--ink);
    font-weight: 800;
    font-size: 15.5px;
}

.transcript__meta {
    color: var(--muted);
    font-size: 13px;
}

.transcript__chevron {
    width: 9px;
    height: 9px;
    margin-left: auto;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.transcript[open] .transcript__chevron {
    transform: rotate(225deg);
}

.transcript__panel {
    padding: 0 22px 22px;
}

.transcript__tools {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.transcript__search {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f5f7fa;
    color: var(--ink);
    font-size: 14px;
}

.transcript__search:focus {
    outline: none;
    border-color: #e10600;
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.10);
}

.transcript__body {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
}

.transcript__body p {
    margin: 0 0 14px;
    color: #2a3441;
    font-size: 15.2px;
    line-height: 1.8;
}

.transcript__body p:last-child {
    margin-bottom: 0;
}

.transcript__body p[hidden] {
    display: none;
}

.ts {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 7px;
    border: 0;
    border-radius: 5px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 11.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    vertical-align: 1px;
}

.ts:hover {
    background: var(--blue);
    color: #ffffff;
}

.transcript__none {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Paginación
   -------------------------------------------------------------------------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 36px 0 10px;
}

.pagination__link,
.pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.pagination__link:hover {
    border-color: #c3ced9;
    color: var(--blue);
}

.pagination__link.is-current {
    background: var(--navy);
    border-color: var(--navy);
    color: #ffffff;
}

.pagination__link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.page-head__sub,
.section-head__page {
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Estados vacíos y pie
   -------------------------------------------------------------------------- */

.empty {
    margin: 34px 0;
    padding: 48px 24px;
    border: 1px dashed #c3ced9;
    border-radius: var(--radius);
    background: var(--white);
    text-align: center;
}

.empty__title {
    font-size: 22px;
}

.empty__text {
    margin: 8px 0 18px;
    color: var(--muted);
}

.site-footer {
    margin-top: 56px;
    background: var(--navy);
    color: #c9d3dd;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 22px;
    padding-bottom: 22px;
    font-size: 13.5px;
}

.site-footer__nav {
    display: flex;
    gap: 18px;
}

.site-footer a {
    color: #c9d3dd;
}

.site-footer a:hover {
    color: #ffffff;
}

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

@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero__title {
        font-size: 24px;
    }

    .video-detail__title {
        font-size: 27px;
    }
}

@media (max-width: 860px) {
    .header-main__inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 0;
        min-height: 0;
    }

    .brand {
        font-size: 26px;
    }

    .search {
        flex-basis: 100%;
        max-width: none;
    }

    .main-nav__inner {
        gap: 22px;
    }

    .main-nav__blog {
        margin-left: 0;
        padding-left: 0;
    }
}

@media (max-width: 680px) {
    .container {
        padding: 0 16px;
    }

    .page-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .page-head__title {
        font-size: 28px;
    }

    .hero__body {
        padding: 16px 18px 16px;
    }

    .hero__title {
        font-size: 21px;
    }

    .hero__desc {
        font-size: 14.5px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cv-play {
        width: 64px;
        height: 64px;
    }

    .cv-play svg {
        width: 24px;
        height: 24px;
    }

    .video-detail__title {
        font-size: 23px;
    }

    .transcript__summary,
    .transcript__panel {
        padding-left: 16px;
        padding-right: 16px;
    }

    .transcript__tools {
        flex-direction: column;
        align-items: stretch;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --------------------------------------------------------------------------
   Utilidades
   -------------------------------------------------------------------------- */

.copy-helper {
    position: fixed;
    left: -9999px;
    top: 0;
    opacity: 0;
}

/* Miniatura de ejemplo usada solo en la vista previa estática. */
.thumb-art {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #151c25 0%, #0b0f14 100%);
    overflow: hidden;
}

.thumb-art svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.thumb-art__symbol {
    position: absolute;
    left: 22px;
    bottom: 12px;
    color: rgba(255, 255, 255, 0.14);
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Buscador de vídeos
   ========================================================================== */

.video-search {
    display: flex;
    gap: 10px;
    margin: 0 0 26px;
}

.video-search__input {
    flex: 1 1 auto;
    min-width: 0;
}

.search-results {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 16px;
}

.search-result {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 18px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.search-result__thumb {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #151c25;
}

.search-result__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.search-result__title {
    font-size: 1.06rem;
    line-height: 1.3;
}

.search-result__title a {
    color: var(--ink);
}

.search-result__title a:hover {
    color: var(--blue);
}

.search-result__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

.search-result__snippet {
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.55;
}

@media (max-width: 640px) {
    .search-result {
        grid-template-columns: 1fr;
    }

    .video-search {
        flex-direction: column;
    }
}

/* ==========================================================================
   Capítulos del vídeo
   ========================================================================== */

.chapters {
    margin: 22px 0 0;
    padding: 16px 18px;
    background: var(--blue-soft);
    border: 1px solid #dde4eb;
    border-radius: var(--radius);
}

.chapters__title {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue-dark);
}

.chapters__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 2px;
    max-height: 320px;
    overflow-y: auto;
}

.chapters__link {
    display: flex;
    align-items: baseline;
    gap: 10px;
    width: 100%;
    padding: 6px 8px;
    background: none;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    font-size: 0.94rem;
    text-align: left;
    cursor: pointer;
}

.chapters__link:hover,
.chapters__link:focus-visible {
    background: rgba(225, 6, 0, 0.08);
    color: var(--blue-dark);
}

.chapters__time {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--blue);
}

.chapters__label {
    flex: 1 1 auto;
}

/* --------------------------------------------------------------------------
   Compartir (ficha de vídeo)
   -------------------------------------------------------------------------- */
.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.share__label {
    margin-right: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.share__btn {
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.share__btn:hover {
    border-color: var(--blue);
    background: var(--blue-soft);
    color: var(--blue-dark);
}

.share__btn--copy {
    border-style: dashed;
}

.share__btn--copy.is-done {
    border-style: solid;
    border-color: var(--green);
    background: var(--green-soft);
    color: var(--green);
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.empty__code {
    margin: 0 0 4px;
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--line);
}

@media (max-width: 640px) {
    .empty__code {
        font-size: 46px;
    }
}

/* ==========================================================================
   CARFY · capa de identidad
   --------------------------------------------------------------------------
   Todo lo anterior es el sistema de componentes heredado (tarjetas,
   reproductor, capítulos, transcripción). Aquí solo se cambia el "chrome":
   cabecera blanca, barra superior oscura, pie oscuro y logo de Carfy.
   ========================================================================== */

/* ---------- Barra superior ---------- */
.topbar {
    background: var(--navy);
    color: #c7d2dd;
    font-size: 0.8rem;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 34px;
}

.topbar__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #ffffff;
    white-space: nowrap;
}

.topbar__live .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 0 3px rgb(46 204 113 / 0.18);
}

.topbar__nav {
    display: flex;
    gap: 16px;
    overflow: hidden;
}

.topbar__nav a {
    color: #c7d2dd;
    white-space: nowrap;
}

.topbar__nav a:hover {
    color: #ffffff;
}

/* ---------- Cabecera blanca ---------- */
.site-header,
.header-main {
    background: #ffffff;
}

.site-header {
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-main__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

/* ---------- Logo de Carfy ---------- */
.logo {
    display: inline-flex;
    align-items: center;
    flex: none;
    text-decoration: none;
    line-height: 1;
}

.logo:hover {
    text-decoration: none;
}

.logo__word {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.72rem;
    letter-spacing: -0.055em;
    line-height: 0.95;
    color: #46525f;
    padding-bottom: 0.08em;
}

.logo__fy {
    color: var(--blue);
}

.logo__tld {
    color: #46525f;
}

/* ---------- Menú: ahora sobre blanco ---------- */
.main-nav {
    background: transparent;
    margin-left: auto;
}

.main-nav__inner {
    gap: 22px;
    min-height: 40px;
}

.main-nav__link {
    color: var(--text);
    font-size: 14.5px;
    font-weight: 600;
    border-bottom-color: transparent;
}

.main-nav__link:hover {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.main-nav__link[aria-current="page"] {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.main-nav__blog {
    margin-left: 0;
    border-bottom-color: transparent;
}

/* ---------- Buscador de la cabecera ---------- */
.search--head {
    flex: 0 1 260px;
    margin-left: auto;
}

.search--head .search__input {
    background: var(--bg-2);
}

/* ---------- Botones: radio de Carfy ---------- */
.btn {
    border-radius: 8px;
}

/* ---------- Pie ---------- */
.site-footer {
    margin-top: 56px;
    background: var(--navy);
    color: #c9d3dd;
    padding: 40px 0 18px;
}

.site-footer__cols {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
}

.site-footer__brand {
    margin-bottom: 10px;
}

.site-footer__brand .logo__word,
.site-footer__brand .logo__tld {
    color: #e6edf4;
}

.site-footer__brand .logo__fy {
    color: #ff3b30;
}

.site-footer__pitch {
    margin: 0;
    font-size: 0.88rem;
    max-width: 34ch;
    color: #9aa8b6;
}

.site-footer h4 {
    margin: 0 0 10px;
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.site-footer ul a,
.site-footer a {
    color: #c9d3dd;
    font-size: 0.9rem;
}

.site-footer ul a:hover,
.site-footer a:hover {
    color: #ffffff;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid rgb(255 255 255 / 0.1);
    font-size: 13px;
    color: #8697a8;
}

/* ---------- Huecos de publicidad ----------
   La altura se reserva siempre, haya anuncio o no: así AdSense no mueve
   el layout (CLS 0). */
.ad {
    margin-block: 26px;
    contain: layout paint;
}

.ad__tag {
    display: block;
    margin-bottom: 6px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.ad__slot {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background:
        repeating-linear-gradient(45deg, transparent 0 8px, rgb(11 15 20 / 0.018) 8px 16px),
        var(--bg-2);
}

.ad--970x90 .ad__slot { min-height: 90px; }
.ad--970x250 .ad__slot { min-height: 250px; }
.ad--300x600 .ad__slot { min-height: 600px; }
.ad--320x100 .ad__slot { min-height: 100px; }
.ad--resp .ad__slot { min-height: 250px; }

@media (max-width: 767px) {
    .ad--970x90 .ad__slot { min-height: 100px; }
    .ad--970x250 .ad__slot { min-height: 100px; }
    .ad--resp .ad__slot { min-height: 280px; }
    .ad--300x600 { display: none; }
}

/* ---------- Banner de consentimiento ---------- */
.cmp {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    padding: 12px;
    animation: cmp-in 0.22s ease-out;
}

.cmp--out {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s;
}

@keyframes cmp-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cmp__inner {
    max-width: 1040px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #0b0f14;
    color: #e6edf4;
    box-shadow: 0 18px 40px rgb(11 15 20 / 0.32);
}

.cmp__txt {
    margin: 0;
    flex: 1 1 340px;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #c7d2dd;
}

.cmp__txt strong { color: #ffffff; }
.cmp__txt a { color: #ff8a80; text-decoration: underline; }

.cmp__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cmp__btn {
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.cmp__btn--ghost {
    background: transparent;
    border-color: #3a4653;
    color: #e6edf4;
}

.cmp__btn--ghost:hover { background: #151c25; }

.cmp__btn--primary {
    background: #e10600;
    color: #ffffff;
}

.cmp__btn--primary:hover { background: #c00500; }

@media (max-width: 600px) {
    .cmp { padding: 8px; }
    .cmp__inner { padding: 14px; border-radius: 10px; }
    .cmp__btns { width: 100%; }
    .cmp__btn { flex: 1; text-align: center; }
}

/* ---------- Responsive de la capa nueva ---------- */
@media (max-width: 860px) {
    .site-footer__cols {
        grid-template-columns: 1fr 1fr;
    }

    .search--head {
        flex-basis: 100%;
        margin-left: 0;
    }

    .main-nav {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .logo__word { font-size: 1.5rem; }
    .topbar__nav { display: none; }
    .site-footer__cols { grid-template-columns: 1fr; }
}