/* =====================================================
   RECURSOS — YOUTUBE
   ===================================================== */

/* Padding superior de 14px: sumado al espacio entre bloques (24px) tras el
   título de la página, deja 38px hasta los botones, igual que la barra del
   filtro de Marketplace (24px + 14px de padding). */
.pwb-yt-resources {
    padding-block: var(--wp--preset--spacing--px-14) var(--wp--preset--spacing--px-80);
}

/* Botón "Cargar más" — calcado literal de .pwb-roi__btn +
   .pwb-roi__btn--primary del plugin powerbim-roi (Inter, no Sora), con el
   mismo estado disabled atenuado a opacity:.35. */
.pwb-load-more {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--px-8);
    padding: var(--wp--preset--spacing--px-8) var(--wp--preset--spacing--px-24);
    border-radius: var(--wp--custom--radius--sm);
    border: none;
    background: var(--wp--preset--color--custom-pwb-primary-color, var(--wp--preset--color--custom-pwb-primary-color));
    color: var(--wp--preset--color--custom-pwb-dark-navy-accent, var(--wp--preset--color--custom-pwb-dark-navy-accent));
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pwb-load-more:disabled {
    opacity: 0.35;
    cursor: default;
}

.pwb-load-more:not(:disabled):hover {
    opacity: 0.8;
}

.pwb-load-more:active:not(:disabled) {
    transform: scale(0.98);
}

.pwb-yt-resources__results {
    margin-top: var(--wp--preset--spacing--px-40);
    transition: opacity 0.15s ease;
}

.pwb-yt-resources__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--wp--preset--spacing--px-24);
}

.pwb-load-more__wrap {
    display: flex;
    justify-content: center;
    margin-top: var(--wp--preset--spacing--px-40);
}

.pwb-yt-resources__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--wp--preset--font-size--sm-plus);
}

.pwb-yt-resources__card {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.pwb-yt-resources__card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--wp--custom--radius--lg);
    overflow: hidden;
    background-color: var(--wp--preset--color--custom-pwb-secondary-background);
}

.pwb-yt-resources__card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pwb-yt-resources__card:hover .pwb-yt-resources__card-media img {
    transform: scale(1.04);
}

.pwb-yt-resources__card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--wp--preset--color--custom-pwb-secondary-background) 0%, var(--wp--preset--color--custom-pwb-secondary-background) 100%);
}

.pwb-yt-resources__card-sample-badge {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--wp--custom--radius--pill);
    padding: var(--wp--preset--spacing--px-4) var(--wp--preset--spacing--px-12);
}

.pwb-yt-resources__card-play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwb-yt-resources__card-play svg {
    width: 56px;
    height: 56px;
    padding: var(--wp--preset--spacing--px-16);
    box-sizing: border-box;
    border-radius: 50%;
    background: rgba(12, 17, 23, 0.55);
    color: var(--wp--custom--color--white);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.pwb-yt-resources__card:hover .pwb-yt-resources__card-play svg,
.pwb-yt-resources__card:focus-visible .pwb-yt-resources__card-play svg {
    background: var(--wp--preset--color--custom-pwb-primary-color);
    color: var(--wp--preset--color--custom-pwb-main-background);
    transform: scale(1.08);
}

.pwb-yt-resources__card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: var(--wp--preset--spacing--px-16);
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pwb-yt-resources__card:hover .pwb-yt-resources__card-overlay,
.pwb-yt-resources__card:focus-visible .pwb-yt-resources__card-overlay {
    opacity: 1;
}

.pwb-yt-resources__card-title {
    font-family: 'Sora', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--wp--custom--color--white);
}

@media (max-width: 960px) {
    .pwb-yt-resources__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .pwb-yt-resources__grid {
        grid-template-columns: 1fr;
    }
}

/* Modal — mismo lenguaje visual que .hero__video-modal-*, con un iframe de
   YouTube en vez de un <video> local. */
.pwb-yt-resources__modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--wp--custom--z-index--modal, 9999);
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: var(--wp--preset--spacing--px-20);
    box-sizing: border-box;
}

.pwb-yt-resources__modal {
    width: 100%;
    max-width: 960px;
}

.pwb-yt-resources__modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--wp--preset--spacing--px-12);
}

.pwb-yt-resources__modal-title {
    font-family: var(--wp--preset--font-family--sora);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.pwb-yt-resources__modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wp--custom--color--white);
    padding: var(--wp--preset--spacing--px-4);
    line-height: 0;
    transition: opacity 0.15s;
}

.pwb-yt-resources__modal-close:hover {
    opacity: 0.7;
}

.pwb-yt-resources__modal-close svg {
    width: 22px;
    height: 22px;
}

.pwb-yt-resources__modal-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: var(--wp--custom--radius--lg);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.pwb-yt-resources__modal-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.pwb-yt-resources__modal-sample-note {
    margin: var(--wp--preset--spacing--px-12) 0 0;
    text-align: center;
    font-size: var(--wp--preset--font-size--xs-plus);
    color: rgba(255, 255, 255, 0.5);
}

/* =====================================================
   LEAD FORMS — HONEYPOT
   Hidden field every lead form carries to catch bots that fill all inputs
   (pwb_leads_honeypot_field() in mu-plugins/pwb-leads-core.php). Off-screen
   rather than display:none, which simple bots skip; aria-hidden and out of the
   tab order in the markup, so people and assistive technology never reach it.
   ===================================================== */
.pwb-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
