/* =============================================
   Custom YouTube Feed — style.css  v2.0
   ============================================= */

/* ── Tab Navigation ── */
.cyf-wrap {
    font-family: inherit;
}

.cyf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 3px solid #000;
    padding-bottom: 0;
    margin-bottom: 35px;
    justify-content: center;
}

.cyf-tab {
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 16px;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
    cursor: pointer;
    transition: box-shadow 0.12s ease, transform 0.12s ease, background 0.12s ease;
    position: relative;
    bottom: -15px;
    border-radius: 0px;
}

.cyf-tab:hover, .cyf-tab:focus {
    background-color: #ff0000;
    box-shadow: 1px 1px 0 #000;
    transform: translate(2px, 2px);
}

.cyf-tab--active {
    background: #ff0000;
    color: #fff;
    box-shadow: none;
    transform: translate(3px, 3px);
    border-bottom-color: #ff0000; /* Merge with border-bottom visually */
}

/* ── Tab Panels ── */
.cyf-panel {
    display: none;
}

.cyf-panel--active {
    display: block;
}

/* ── Video Grid ── */
.custom-yt-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 4px 0 20px;
}

/* ── Video Card ── */
.custom-yt-card {
    text-align: center;
    background: #fff;
}

.custom-yt-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ── Thumbnail ── */
.custom-yt-thumb {
    position: relative;
    margin-bottom: 40px;
    overflow: visible;
}

.custom-yt-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

/* Play icon on hover */
.custom-yt-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 50px;
    height: 50px;
    background: rgba(255, 0, 0, 0.88);
    color: #fff;
    font-size: 20px;
    line-height: 50px;
    border-radius: 0;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.custom-yt-link:hover .custom-yt-play-icon {
    opacity: 1;
}

/* Badge tajuk bertindih bawah thumbnail */
.custom-yt-badge {
    position: absolute;
    bottom: -25px;
    left: 10%;
    right: 10%;
    background: #fff;
    padding: 10px;
    border: 2px solid #000;
    box-shadow: 4px 4px 0 #000;
    z-index: 2;
}

.custom-yt-badge h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Card Content ── */
.custom-yt-content {
    padding: 10px;
}

.cyf-views {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.custom-yt-content p {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    padding: 0 10px;
    margin-bottom: 12px;
}

/* ── Watch Video Button ── */
.custom-yt-btn {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding: 8px 18px;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
    transition: box-shadow 0.12s ease, transform 0.12s ease;
}

.custom-yt-btn:hover {
    box-shadow: 1px 1px 0 #000;
    transform: translate(2px, 2px);
    color: #fff;
}

/* ── Empty state ── */
.cyf-empty {
    color: #888;
    font-size: 14px;
    padding: 20px 0;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 900px) {
    .custom-yt-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .cyf-tabs {
        gap: 4px;
    }

    .cyf-tab {
        font-size: 11px;
        padding: 6px 10px;
    }

    .custom-yt-container {
        grid-template-columns: 1fr;
    }
}
