/* Dinero hub — Yahoo-style featured + sidebar videos */

.d-videos {
    background: #fff;
    border: 1px solid var(--fz-line, #e8eaed);
    border-radius: 14px;
    padding: 22px 20px;
    margin-bottom: 24px;
}

body.dinero-hub.dark-mode .d-videos {
    background: #202124;
    border-color: #3c4043;
}

.d-videos__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.d-videos__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fz-ink, #202124);
}

.d-videos__more {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--dinero-green, #00a86b);
    text-decoration: none !important;
}

.d-videos__more:hover {
    text-decoration: underline !important;
}

.d-videos__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 18px 22px;
    align-items: start;
}

.d-videos__featured-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.d-videos__featured-btn:focus-visible {
    outline: 2px solid var(--dinero-green, #00a86b);
    outline-offset: 3px;
    border-radius: 12px;
}

.d-videos__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #1e293b;
    margin-bottom: 12px;
}

.d-videos__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.d-videos__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding-left: 4px;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    font-size: 1.1rem;
    pointer-events: none;
}

.d-videos__featured-title {
    margin: 0 0 8px;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 800;
    line-height: 1.35;
    color: var(--fz-ink, #202124);
}

.d-videos__featured-btn:hover .d-videos__featured-title {
    color: var(--dinero-green, #00a86b);
}

.d-videos__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--fz-muted, #5f6368);
}

.d-videos__badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--dinero-green, #00a86b);
    padding: 2px 7px;
    border-radius: 6px;
}

.d-videos__sidebar-label {
    margin: 0 0 10px;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--fz-ink, #202124);
}

.d-videos__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.d-videos__item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100%;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--fz-line, #e8eaed);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

body.dinero-hub.dark-mode .d-videos__item {
    border-bottom-color: #3c4043;
}

.d-videos__item:first-child {
    padding-top: 0;
}

.d-videos__item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.d-videos__item:focus-visible {
    outline: 2px solid var(--dinero-green, #00a86b);
    outline-offset: 2px;
    border-radius: 8px;
}

.d-videos__item-thumb {
    position: relative;
    width: 112px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #1e293b;
}

.d-videos__item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.d-videos__item-play {
    position: absolute;
    right: 4px;
    bottom: 4px;
    font-size: 0.62rem;
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
    padding: 2px 5px;
    border-radius: 4px;
    pointer-events: none;
}

.d-videos__item-title {
    margin: 0 0 6px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--fz-ink, #202124);
}

.d-videos__item:hover .d-videos__item-title {
    color: var(--dinero-green, #00a86b);
}

.d-videos__item-meta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fz-muted, #5f6368);
    line-height: 1.35;
}

.d-videos__note {
    margin: 14px 0 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fz-muted, #5f6368);
}

.d-videos-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.d-videos-modal.is-open {
    display: flex;
}

.d-videos-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.d-videos-modal__content {
    position: relative;
    z-index: 1;
    width: min(900px, 100%);
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.d-videos-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.d-videos-modal__player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.d-videos-modal__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 860px) {
    .d-videos__grid {
        grid-template-columns: 1fr;
    }

    .d-videos__item {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .d-videos__item-thumb {
        width: 96px;
    }
}
