/**
 * Videos section — Blueprint Engine.
 *
 * Skin-agnostic — uses CSS variables override'owalne per skin.
 *
 * @package Blueprint\Engine\Realizacje
 * @since 2.4.0
 */

.bp-videos-section {
    --bp-videos-radius: 14px;
    --bp-videos-overlay: rgba(0, 0, 0, .35);
    --bp-videos-overlay-hover: rgba(0, 0, 0, .15);
    --bp-videos-play-bg: rgba(255, 255, 255, .95);
    --bp-videos-play-color: var(--bs-primary, #0d6efd);
    --bp-videos-card-bg: var(--bs-tertiary-bg, #f8f9fa);
    padding: 3rem 0;
}

.bp-videos-section__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.bp-videos-section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1.25rem;
    border-radius: 999px;
    background: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 1rem;
}

.bp-videos-section__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    margin: 0;
}

.bp-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 1.5rem;
}

.bp-video-card {
    border-radius: var(--bp-videos-radius);
    overflow: hidden;
    background: var(--bp-videos-card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: transform .3s ease, box-shadow .3s ease;
}

.bp-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .15);
}

.bp-video-card__trigger {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    position: relative;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.bp-video-card__trigger:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 4px;
}

.bp-video-card__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #000;
}

.bp-video-card__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-secondary));
    color: rgba(255, 255, 255, .6);
}

.bp-video-card__thumb--placeholder i {
    font-size: 3.5rem;
}

.bp-video-card__overlay {
    position: absolute;
    inset: 0;
    background: var(--bp-videos-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s ease;
    aspect-ratio: 16 / 9;
    pointer-events: none;
}

.bp-video-card:hover .bp-video-card__overlay {
    background: var(--bp-videos-overlay-hover);
}

.bp-video-card__play {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bp-videos-play-bg);
    color: var(--bp-videos-play-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    transition: transform .3s ease;
}

.bp-video-card__play i {
    font-size: 2.5rem;
    margin-left: 4px;
}

.bp-video-card:hover .bp-video-card__play {
    transform: scale(1.1);
}

.bp-video-card__meta {
    padding: 1rem 1.25rem 1.25rem;
}

.bp-video-card__type {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    background: rgba(var(--bs-primary-rgb), .12);
    color: var(--bs-primary);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .65rem;
}

.bp-video-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    line-height: 1.3;
    color: var(--bs-body-color);
}

.bp-video-card__desc {
    color: var(--bs-secondary-color);
    font-size: .9rem;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal player */
.bp-video-modal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

.bp-video-modal__player {
    background: #000;
}

.bp-video-modal__player iframe,
.bp-video-modal__player video {
    width: 100%;
    height: 100%;
}

/* Mobile */
@media (max-width: 575.98px) {
    .bp-videos-section { padding: 2rem 0; }
    .bp-videos-grid { gap: 1rem; }
    .bp-video-card__play { width: 56px; height: 56px; }
    .bp-video-card__play i { font-size: 1.75rem; }
}
