/* =============================================================
   Video Blog Grid – Frontend Styles
   ============================================================= */

/* --- Grid item -------------------------------------------- */
.vbg-wrapper {
    width: 100%;
}

.vbg-list {
    display: flex;
    flex-direction: column;
}

.vbg-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;                 /* overridden by Elementor control */
}

.vbg-item + .vbg-item {
    margin-top: 48px;          /* overridden by Elementor control */
}

/* --- Thumbnail -------------------------------------------- */
.vbg-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    width: 45%;                /* overridden by Elementor control */
    cursor: pointer;
    overflow: hidden;
    line-height: 0;
}

.vbg-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.vbg-thumb-wrap:hover img {
    transform: scale(1.03);
}

/* Play button overlay */
.vbg-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.90);
    border-radius: 50%;
    pointer-events: none;
    transition: background 0.2s;
}

/* Triangle */
.vbg-play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 18px solid #000;
}

.vbg-thumb-wrap:hover .vbg-play-btn {
    background: rgba(255,255,255,1);
}

/* --- Content (right side) --------------------------------- */
.vbg-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.vbg-title {
    margin: 0 0 16px;
    line-height: 1.2;
    font-weight: 700;
}

.vbg-excerpt {
    margin: 0 0 24px;
    line-height: 1.6;
}

/* --- Button ----------------------------------------------- */
.vbg-btn {
    display: inline-block;
    text-decoration: none;
    padding: 10px 24px;
    border: 1px solid currentColor;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* Hover: Elementor-Controls überschreiben diese Werte.
   Fallback falls keine Hover-Farbe gesetzt ist: leichte Abdunklung */
.vbg-btn:hover {
    opacity: 0.8;
}

/* --- Load More -------------------------------------------- */
.vbg-load-more-wrap {
    text-align: center;
    margin-top: 48px;
}

.vbg-load-more {
    display: inline-block;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    transition: opacity 0.2s;
}

.vbg-load-more:hover {
    opacity: 0.65;
}

.vbg-load-more.vbg-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* =============================================================
   LIGHTBOX
   ============================================================= */
#vbg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(122,120,120,0.70); /* default; overridden by Elementor */
}

#vbg-lightbox[style*="display:none"],
#vbg-lightbox[style*="display: none"] {
    display: none !important;
}

#vbg-lightbox-inner {
    position: relative;
    width: 90vw;
    max-width: 900px;
}

#vbg-lightbox-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

#vbg-lightbox-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

#vbg-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: #fff;
    color: #000;
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 1;
    transition: background-color 0.15s, color 0.15s;
}

#vbg-lightbox-close:hover {
    background: #eee;
    color: #000;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

/* Tablet landscape (≤1024px) */
@media (max-width: 1024px) {
    .vbg-item {
        gap: 28px;
    }
    .vbg-thumb-wrap {
        width: 48% !important;
    }
}

/* Tablet portrait (≤768px) */
@media (max-width: 768px) {
    .vbg-item {
        gap: 24px;
    }
    .vbg-thumb-wrap {
        width: 46% !important;
    }
    .vbg-title {
        font-size: 1.1rem;
    }
}

/* Smartphone (≤600px) */
@media (max-width: 600px) {
    .vbg-item {
        flex-direction: column;
        gap: 16px;
    }

    .vbg-thumb-wrap {
        width: 100% !important;
    }

    .vbg-content {
        width: 100%;
    }

    /* Lightbox mobile: full-width video, no sidebar */
    #vbg-lightbox-inner {
        width: 96vw;
    }

    #vbg-lightbox-close {
        top: -38px;
        right: 0;
    }
}
