/* ── Wema YouTube Feed v1.1 ── */

/* Bio canale */
.wyf-bio {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 24px;
    margin-bottom: 24px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
}
.wyf-bio__avatar-link { flex-shrink: 0; }
.wyf-bio__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.wyf-bio__text { flex: 1; min-width: 0; }
.wyf-bio__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.wyf-bio__name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f0f0f;
    text-decoration: none;
}
.wyf-bio__name:hover { text-decoration: underline; }
.wyf-bio__subs {
    font-size: .85rem;
    color: #606060;
}
.wyf-bio__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ff0000;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: background .15s;
    margin-left: auto;
}
.wyf-bio__cta:hover { background: #cc0000; }
.wyf-bio__desc {
    margin: 0;
    font-size: .875rem;
    color: #444;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .wyf-bio { flex-direction: column; gap: 12px; }
    .wyf-bio__cta { margin-left: 0; }
}

/* Griglia */
.wyf-grid {
    display: grid;
    grid-template-columns: repeat(var(--wyf-cols, 3), 1fr);
    gap: 20px;
}
@media (max-width: 768px) { .wyf-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 480px) { .wyf-grid { grid-template-columns: 1fr; } }

/* Card video */
.wyf-item {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    transition: transform .2s ease, box-shadow .2s ease;
}
.wyf-item:hover, .wyf-item:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    outline: none;
}
/* Animazione fade-in per i nuovi video caricati */
.wyf-item--new {
    animation: wyf-fadein .35s ease both;
}
@keyframes wyf-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Thumbnail */
.wyf-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
}
.wyf-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}
.wyf-item:hover .wyf-thumb img { opacity: .85; }

/* Play button */
.wyf-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.wyf-item:hover .wyf-play,
.wyf-item:focus .wyf-play { opacity: 1; }
.wyf-play svg {
    width: 64px;
    height: 45px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
}

/* Titolo */
.wyf-title {
    padding: 8px 10px;
    margin: 0;
    font-size: .875rem;
    line-height: 1.35;
    color: #fff;
    background: #111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Carica altri */
.wyf-load-more-wrap {
    text-align: center;
    margin-top: 28px;
}
.wyf-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #0f0f0f;
    border: 2px solid #0f0f0f;
    padding: 10px 28px;
    font-size: .9rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.wyf-load-more-btn:hover {
    background: #0f0f0f;
    color: #fff;
}
.wyf-load-more-btn:disabled {
    opacity: .5;
    cursor: wait;
}

/* Modal */
.wyf-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wyf-modal[hidden] { display: none; }
.wyf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.85);
}
.wyf-modal-box {
    position: relative;
    z-index: 1;
    width: min(90vw, 960px);
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
.wyf-iframe-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.wyf-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.wyf-close {
    position: absolute;
    top: -38px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    padding: 0 4px;
    opacity: .8;
    transition: opacity .15s;
}
.wyf-close:hover { opacity: 1; }
