/* ---------------------------------- */
/* Featured Work Section CSS Layout   */
/* ---------------------------------- */

.portfolio-section {
    background: linear-gradient(180deg, #0A0A0A 0%, #111112 100%); /* Rich dark gradient */
    color: var(--color-text-white);
    padding: 55px 0; /* Reduced padding */
    position: relative;
    z-index: 20;
    width: 100%;
    overflow: hidden;
}

/* Subtle Gold Grid overlay on dark background */
.portfolio-grid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
    background-image: 
        linear-gradient(rgba(234, 161, 15, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234, 161, 15, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center top;
}

.portfolio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px; /* Aligned with global 24px container padding */
    position: relative;
    z-index: 5;
}

/* Split Header Layout */
.portfolio-header-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-bottom: 35px; /* Reduced vertical space */
}

.portfolio-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

/* Featured Work horizontal line badge */
.portfolio-sub-badge {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--color-gold-start);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.badge-line {
    width: 32px;
    height: 1px;
    background-color: rgba(234, 161, 15, 0.35);
    display: inline-block;
}

.portfolio-main-title {
    font-family: var(--font-primary);
    font-size: 2.0rem; /* Compact premium size matching Services title scale */
    font-weight: 900;
    color: var(--color-text-white);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-top: 10px;
    line-height: 1.1;
}

/* Gold Heading Span matching Services section */
.portfolio-main-title span {
    background: linear-gradient(135deg, var(--color-gold-start), var(--color-gold-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.portfolio-header-right {
    display: flex;
    align-items: center;
    padding-bottom: 6px;
}

/* View All Projects underline link */
.portfolio-view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-text-white);
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
    letter-spacing: 0.12em;
    transition: var(--transition-smooth);
}

.portfolio-view-all-link:hover {
    color: var(--color-gold-start);
    border-color: var(--color-gold-start);
}

/* Right angle icon badge in circle */
.circle-arrow-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    color: var(--color-text-white);
    transition: var(--transition-smooth);
}

.portfolio-view-all-link:hover .circle-arrow-btn {
    background-color: var(--color-gold-start);
    border-color: var(--color-gold-start);
    color: var(--color-black);
    transform: scale(1.05);
}

/* Tickers boundary wrapper - Full Screen Bleed (No longer requires viewport margins) */
.portfolio-stripes-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Reduced space between rows */
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px; /* Reduced bottom space */
    position: relative;
    z-index: 5;
}

.portfolio-stripe-row {
    width: 100%;
    overflow: hidden;
    display: flex;
}

/* Horizontal Track scrolling animation */
.portfolio-track {
    display: flex;
    gap: 20px; /* Reduced gap */
    padding: 10px 0;
    width: max-content;
}

.portfolio-stripe-row:hover .portfolio-track {
    animation-play-state: paused; /* Pause on hover */
    cursor: pointer;
}

/* Row 1 animation: Left to Right scrolling loop */
.animate-scroll-left {
    animation: scroll-left-portfolio 40s linear infinite; /* Slightly faster loop */
}

/* Row 2 animation: Right to Left scrolling loop */
.animate-scroll-right {
    animation: scroll-right-portfolio 40s linear infinite;
}

/* Translate Offset for Row 1: (Card Width 310px + Gap 20px) * 4 cards = 1320px */
@keyframes scroll-left-portfolio {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-1320px);
    }
}

/* Translate Offset for Row 2 (Vertical Cards): (Card Width 220px + Gap 20px) * 4 cards = 960px */
.animate-scroll-right {
    animation: scroll-right-portfolio-vertical 40s linear infinite;
}

@keyframes scroll-right-portfolio-vertical {
    0% {
        transform: translateX(-960px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Video Card Styling */
.portfolio-video-card {
    flex: 0 0 310px; /* Shrunk width */
    aspect-ratio: 16 / 10;
    background-color: #121213;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px; /* Smoother corner for smaller cards */
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-video-card:hover {
    transform: scale(1.02);
    border-color: rgba(234, 161, 15, 0.3);
}

/* Vertical 9:16 aspect ratio for the bottom row */
.portfolio-stripe-row:nth-child(2) .portfolio-video-card {
    aspect-ratio: 9 / 16;
    flex: 0 0 220px; /* Reduced width for vertical format to keep height manageable */
}

/* Embedded Looping video tag */
.portfolio-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.portfolio-video-card:hover .portfolio-video {
    opacity: 0.95;
    transform: scale(1.03);
}

/* Gradient overlay to shadow text on bottom */
.portfolio-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
    z-index: 2;
}

/* Central Gold Play Button Overlay */
.portfolio-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: var(--color-gold-start);
    border: 3px solid rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1.1rem;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 3;
    box-shadow: 0 8px 24px rgba(234, 161, 15, 0.5);
}

.portfolio-video-card:hover .portfolio-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Card labels meta positioning */
.portfolio-card-meta {
    position: absolute;
    bottom: 22px;
    left: 24px;
    z-index: 4;
    text-align: left;
}

.portfolio-card-title {
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-text-white);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.04em;
}

.portfolio-card-tag {
    font-family: var(--font-primary);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-gold-start);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
    display: block;
}

/* Center CTA button wrapper */
.portfolio-action {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Dark mode customized CTA outline button */
.portfolio-action .btn-book-call {
    background-color: transparent;
    border: 1.5px solid var(--color-gold-start);
    color: var(--color-text-white);
}

.portfolio-action .btn-book-call:hover {
    background-color: var(--color-white);
    color: var(--color-black);
    border-color: var(--color-white);
}

.portfolio-action .btn-book-call:hover .arrow-right-icon {
    color: var(--color-black);
}

/* Responsive queries */
@media (max-width: 768px) {
    .portfolio-track {
        gap: 15px;
    }
    .portfolio-video-card {
        flex: 0 0 270px; /* Compact card sizes for mobile */
    }

    /* Recalculate translateX: (270 + 15) * 4 = 1140px */
    @keyframes scroll-left-portfolio {
        0% { transform: translateX(0); }
        100% { transform: translateX(-1140px); }
    }

    @keyframes scroll-right-portfolio {
        0% { transform: translateX(-1140px); }
        100% { transform: translateX(0); }
    }
}

/* ============================================== */
/*  VIDEO LIGHTBOX MODAL                          */
/* ============================================== */

/* Full-screen overlay — hidden by default */
.portfolio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

/* Dark blurred backdrop */
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
}

/* Centered modal card */
.lightbox-modal {
    position: relative;
    z-index: 10;
    width: 90vw;
    max-width: 900px;
    background: #111;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(234, 161, 15, 0.08);
    transform: scale(0.92) translateY(24px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-lightbox.active .lightbox-modal {
    transform: scale(1) translateY(0);
}

/* Top meta bar */
.lightbox-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px 14px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.lightbox-title-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lightbox-tag {
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-gold-start);
}

.lightbox-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Close X button */
.lightbox-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #aaa;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.lightbox-close-btn svg {
    width: 14px;
    height: 14px;
}

.lightbox-close-btn:hover {
    background: rgba(234, 161, 15, 0.15);
    border-color: rgba(234, 161, 15, 0.3);
    color: var(--color-gold-start);
}

/* Video container — 16:9 ratio */
.lightbox-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.lightbox-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

/* Make cards look clickable */
.portfolio-video-card[data-video-src] {
    cursor: pointer;
}

.portfolio-video-card[data-video-src]:hover .portfolio-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--color-gold-start);
    color: #000;
}

/* ── Mobile Responsive Styles ── */
@media (max-width: 768px) {
    .portfolio-section {
        padding: 40px 0;
    }

    .portfolio-header-split {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 25px;
    }

    .portfolio-main-title {
        font-size: 1.55rem !important;
        line-height: 1.2;
    }

    .portfolio-header-right {
        display: none !important;
    }
}

