/**
 * ================================
 *  Portfolio Breadhead-Style CSS
 * ================================
 * Light theme variant with existing green accent.
 * All selectors prefixed with .bh- to avoid conflicts.
 */

/* ========================
   FILTER BAR
   ======================== */
.bh-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0;
    margin: 0 0 40px;
    list-style: none;
}

.bh-filter-bar li {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #777;
    cursor: pointer;
    border-radius: 30px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.bh-filter-bar li:hover {
    color: #000;
}

.bh-filter-bar li.tab-active {
    color: #fff;
    background-color: var(--theme-color, #009e66);
    border-color: var(--theme-color, #009e66);
}

/* ========================
   PORTFOLIO ARCHIVE
   ======================== */
.bh-portfolio-archive {
    padding-bottom: 80px;
}

/* ========================
   PORTFOLIO GRID
   ======================== */
.bh-portfolio-grid {
    --bh-gap: 24px;
}

.bh-grid-item {
    margin-bottom: var(--bh-gap);
}

/* ========================
   CARD (entire card is a link)
   ======================== */
.bh-card {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    color: #fff;
}

.bh-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    color: #fff;
    text-decoration: none;
}

/* ========================
   CARD MEDIA (fills entire card)
   ======================== */
.bh-card-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
}

.bh-card-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.4s ease;
}

.bh-card:hover .bh-card-thumb {
    transform: scale(1.05);
}

/* Video preview container (HTML5 video injected by JS on hover) */
.bh-card-video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.bh-card--video-active .bh-card-video-preview {
    opacity: 1;
}

.bh-card-video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* ========================
   CATEGORY BADGE (top-left)
   ======================== */
.bh-card-category {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    display: inline-block;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    pointer-events: none;
}

/* ========================
   CARD OVERLAY (title + client at bottom)
   ======================== */
.bh-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 24px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

.bh-card-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.25;
    margin: 0 0 4px;
}

.bh-card-client {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 400;
}

/* ========================
   HOVER ARROW (top-right, diagonal)
   ======================== */
.bh-card-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 50%;
    color: #fff;
    opacity: 0;
    transform: translate(-8px, 8px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.bh-card:hover .bh-card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* ========================
   VIEW MORE BUTTON (shortcode)
   ======================== */
.bh-view-more {
    margin-top: 30px;
}

.bh-portfolio-section {
    padding: 40px 0;
}

/* ========================
   SINGLE PROJECT PAGE
   ======================== */
.bh-single-project {
    padding: 0 0 60px;
}

/* Hero section: vertically centered within viewport */
.bh-project-hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 100px 0 40px;
}

.bh-project-media {
    margin-bottom: 0;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bh-project-media .plyr,
.bh-project-media .plyr--video {
    border-radius: 10px;
    flex: 1;
    min-height: 0;
}

.bh-project-media .plyr--video .plyr__video-wrapper {
    height: 100%;
    padding-bottom: 0 !important; /* Override Plyr's default 16:9 padding trick */
}

.bh-project-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bh-project-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.bh-project-details {
    padding: 0 0 0 30px;
}

/* Category badge on single page (inline, not absolute positioned) */
.bh-single-category {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fff;
    margin-bottom: 20px;
}

.bh-project-title {
    font-size: 48px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0 0 32px;
    color: #fff;
}

.bh-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--theme-color, #009e66);
    margin-bottom: 8px;
}

.bh-project-client {
    margin-bottom: 24px;
}

.bh-client-logo {
    display: block;
    max-width: 120px;
    height: auto;
    margin-bottom: 6px;
}

.bh-client-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.bh-project-description {
    margin-bottom: 24px;
}

.bh-project-content {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}

.bh-project-content p:last-child {
    margin-bottom: 0;
}

.bh-project-team {
    margin-bottom: 24px;
}

.bh-team-row {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 6px;
}

.bh-team-row strong {
    color: #fff;
    font-weight: 600;
    margin-right: 4px;
}

/* ========================
   PROJECT NAVIGATION
   ======================== */
.bh-project-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.bh-project-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.bh-project-nav a:hover {
    color: var(--theme-color, #009e66);
}

.bh-nav-grid {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: background-color 0.2s ease;
}

.bh-nav-grid:hover {
    background: var(--theme-color, #009e66);
    color: #fff !important;
}

/* ========================
   VIDEO POPUP OVERLAY
   ======================== */
.bh-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    cursor: pointer;
}

.bh-popup-overlay.bh-popup--active {
    background: rgba(0, 0, 0, 0.85);
}

.bh-popup-wrapper {
    position: relative;
    width: 90%;
    max-width: 900px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.bh-popup--active .bh-popup-wrapper {
    opacity: 1;
    transform: scale(1);
}

.bh-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.bh-popup-close:hover {
    opacity: 1;
}

.bh-popup-video {
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.bh-popup-video .plyr {
    border-radius: 10px;
}

/* Plyr theme color override */
.bh-popup-video .plyr--video .plyr__control--overlaid,
.bh-project-media .plyr--video .plyr__control--overlaid {
    background: var(--theme-color, #009e66);
}

.bh-popup-video .plyr--video .plyr__control--overlaid:hover,
.bh-project-media .plyr--video .plyr__control--overlaid:hover {
    background: var(--theme-color, #009e66);
    opacity: 0.9;
}

/* Plyr progress bar and volume slider */
.bh-project-media .plyr--full-ui input[type=range] {
    color: var(--theme-color, #009e66);
}

.bh-popup-video .plyr--full-ui input[type=range] {
    color: var(--theme-color, #009e66);
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 991.98px) {
    .bh-project-hero {
        min-height: auto;
        padding: 100px 0 40px;
    }

    .bh-project-details {
        padding: 30px 0 0;
    }

    .bh-project-title {
        font-size: 32px;
    }

    .bh-card-title {
        font-size: 16px;
    }
}

@media (max-width: 767.98px) {
    .bh-filter-bar {
        margin-bottom: 24px;
        gap: 6px;
    }

    .bh-filter-bar li {
        padding: 6px 14px;
        font-size: 12px;
    }

    .bh-card-title {
        font-size: 15px;
    }

    .bh-card-arrow {
        width: 36px;
        height: 36px;
    }

    .bh-card-arrow svg {
        width: 18px;
        height: 18px;
    }

    .bh-project-nav {
        flex-direction: column;
        gap: 16px;
    }

    .bh-project-title {
        font-size: 26px;
    }
}

@media (max-width: 575.98px) {
    .bh-project-title {
        font-size: 22px;
    }
}
