/* Blaster Portfolio for Elementor */

.bpe-portfolio {
    --bpe-cols: var(--bpe-columns-desktop, 3);
    --bpe-gap: 28px;
    --bpe-ink: #111827;
    --bpe-muted: #6b7280;
    --bpe-line: #e5e7eb;
    --bpe-accent: #2563eb;
    --bpe-img-zoom: 1.06;
    --bpe-card-lift: -6px;
    position: relative;
    width: 100%;
}

@media (max-width: 1024px) {
    .bpe-portfolio { --bpe-cols: var(--bpe-columns-tablet, 2); }
}

@media (max-width: 767px) {
    .bpe-portfolio {
        --bpe-cols: var(--bpe-columns-mobile, 1);
        --bpe-gap: 20px;
    }
}

.bpe-portfolio *,
.bpe-portfolio *::before,
.bpe-portfolio *::after {
    box-sizing: border-box;
}

/* Grid */

.bpe-grid {
    display: grid;
    grid-template-columns: repeat(var(--bpe-cols), minmax(0, 1fr));
    gap: var(--bpe-gap);
}

/* Card */

.bpe-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--bpe-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.bpe-card:hover {
    transform: translateY(var(--bpe-card-lift));
    box-shadow: 0 22px 44px -22px rgba(17, 24, 39, 0.28);
}

.bpe-card[hidden] {
    display: none;
}

.bpe-card.bpe-is-new {
    animation: bpe-fade-in 0.45s ease both;
}

@keyframes bpe-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* Image */

.bpe-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f3f4f6;
}

.bpe-card-media img,
.bpe-card-media .bpe-card-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    object-position: top center;
    border-radius: 0;
    transition: transform 0.6s ease, opacity 0.35s ease, filter 0.35s ease;
}

.bpe-card:hover .bpe-card-media img {
    transform: scale(var(--bpe-img-zoom));
}

.bpe-lightbox-trigger {
    display: block;
    height: 100%;
    cursor: zoom-in;
}

.bpe-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #9ca3af;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bpe-image-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0) 40%, rgba(17, 24, 39, 0.45));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.bpe-card:hover .bpe-image-shade {
    opacity: 1;
}

.bpe-quick-view {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--bpe-ink);
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.18);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.25s ease, color 0.25s ease;
}

.bpe-card:hover .bpe-quick-view,
.bpe-quick-view:focus-visible {
    opacity: 1;
    transform: none;
}

@media (hover: none) {
    .bpe-quick-view {
        opacity: 1;
        transform: none;
    }
}

/* Content */

.bpe-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 24px 24px;
}

.bpe-card-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--bpe-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.bpe-project-number {
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

.bpe-card-title {
    margin: 0 0 10px;
    padding: 0;
    color: var(--bpe-ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.25s ease;
}

.bpe-card-excerpt {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
}

.bpe-card-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
}

.bpe-footer-line {
    flex: 1;
    height: 1px;
    background: var(--bpe-line);
}

.bpe-project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0 solid transparent;
    color: var(--bpe-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.bpe-project-link:hover,
.bpe-project-link:focus-visible {
    color: var(--bpe-accent);
}

/* Icons (text arrows, Font Awesome or uploaded SVG) */

.bpe-btn-icon,
.bpe-arrow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.25s ease, color 0.25s ease;
}

.bpe-btn-icon svg,
.bpe-arrow-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.bpe-icon-motion-yes .bpe-project-link:hover .bpe-btn-icon {
    transform: translate(2px, -2px);
}

.bpe-icon-motion-yes .bpe-project-link.bpe-icon-before:hover .bpe-btn-icon {
    transform: translateX(-3px);
}

/* Filter */

.bpe-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.bpe-portfolio .bpe-filter-btn {
    appearance: none;
    margin: 0;
    padding: 9px 18px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: #374151;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-transform: none;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.bpe-portfolio .bpe-filter-btn:hover {
    border-color: var(--bpe-ink);
    background: transparent;
    color: var(--bpe-ink);
}

.bpe-portfolio .bpe-filter-btn.is-active {
    border-color: var(--bpe-ink);
    background: var(--bpe-ink);
    color: #fff;
}

.bpe-filter-empty {
    margin: 24px 0 0;
    color: var(--bpe-muted);
    text-align: center;
}

/* Slider */

.bpe-slider-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.bpe-slider-count {
    color: var(--bpe-ink);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bpe-count-divider {
    margin: 0 6px;
    opacity: 0.4;
}

.bpe-nav-bottom .bpe-slider-toolbar {
    margin: 20px 0 0;
}

.bpe-slider-controls {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.bpe-portfolio .bpe-slider-arrow {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: #fff;
    box-shadow: none;
    color: var(--bpe-ink);
    font-family: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.bpe-portfolio .bpe-slider-arrow:hover {
    border-color: var(--bpe-ink);
    background: var(--bpe-ink);
    color: #fff;
}

.bpe-slider-stage {
    position: relative;
}

/* Arrows on the left and right of the slides. */
.bpe-nav-sides .bpe-slider-stage > .bpe-slider-arrow {
    position: absolute;
    top: var(--bpe-arrow-top, 50%);
    z-index: 3;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.16);
    transform: translateY(-50%);
}

.bpe-nav-sides .bpe-slider-stage > .bpe-slider-prev {
    left: var(--bpe-arrow-offset, 12px);
}

.bpe-nav-sides .bpe-slider-stage > .bpe-slider-next {
    right: var(--bpe-arrow-offset, 12px);
}

.bpe-slider-viewport {
    overflow: hidden;
    /* Room for the hover lift and shadow, which overflow: hidden would otherwise cut off. */
    margin: -12px 0 -28px;
    padding: 12px 0 28px;
    touch-action: pan-y;
}

.bpe-grid.bpe-slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.bpe-slider-track > .bpe-card {
    flex: 0 0 calc((100% - (var(--bpe-cols) - 1) * var(--bpe-gap)) / var(--bpe-cols));
}

.bpe-slider-progress {
    height: 3px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--bpe-line);
}

.bpe-slider-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--bpe-ink);
    transition: width 0.6s ease;
}

.bpe-portfolio.bpe-slider-static .bpe-slider-controls,
.bpe-portfolio.bpe-slider-static .bpe-slider-arrow,
.bpe-portfolio.bpe-slider-static .bpe-slider-progress {
    display: none;
}

/* Load More */

.bpe-load-more-wrap {
    margin-top: 36px;
    text-align: center;
}

.bpe-portfolio .bpe-load-more {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 13px 30px;
    border: 1px solid var(--bpe-ink);
    border-radius: 999px;
    background: var(--bpe-ink);
    box-shadow: none;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.bpe-portfolio .bpe-load-more:hover {
    background: transparent;
    color: var(--bpe-ink);
}

.bpe-portfolio .bpe-load-more:disabled {
    opacity: 0.6;
    cursor: wait;
}

.bpe-load-more-error {
    margin: 12px 0 0;
    color: #b91c1c;
    font-size: 14px;
}

/* Focus */

.bpe-portfolio a:focus-visible,
.bpe-portfolio button:focus-visible {
    outline: 2px solid var(--bpe-accent);
    outline-offset: 3px;
}

.bpe-notice {
    padding: 12px 16px;
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

/* Lightbox */

html.bpe-lightbox-open {
    overflow: hidden;
}

.bpe-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 20px 24px;
    background: rgba(10, 12, 16, 0.9);
}

.bpe-lightbox[hidden] {
    display: none;
}

.bpe-lightbox-frame {
    max-width: min(1200px, 100%);
    max-height: calc(100vh - 140px);
    overflow: auto;
    border-radius: 10px;
    background: #111;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.bpe-lightbox-frame img {
    display: block;
    max-width: 100%;
    height: auto;
}

.bpe-lightbox-caption {
    margin: 14px 0 0;
    color: #f3f4f6;
    font-size: 15px;
    text-align: center;
}

.bpe-lightbox .bpe-lightbox-close {
    appearance: none;
    position: absolute;
    top: 14px;
    right: 16px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.bpe-lightbox .bpe-lightbox-close:hover,
.bpe-lightbox .bpe-lightbox-close:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .bpe-card,
    .bpe-card-media img,
    .bpe-grid.bpe-slider-track,
    .bpe-slider-progress span {
        transition: none;
    }

    .bpe-card:hover,
    .bpe-card:hover .bpe-card-media img {
        transform: none;
    }

    .bpe-card.bpe-is-new {
        animation: none;
    }

    .bpe-icon-motion-yes .bpe-project-link:hover .bpe-btn-icon {
        transform: none;
    }
}
