/**
 * Paper Smart Dynamic Portfolio Frontend Styles
 * Built with Paper Smart Design Tokens
 */

:root {
    --ps-paper: #f7f8f4;
    --ps-ink: #262626;
    --ps-green: #3aa935;
    --ps-forest: #1f7a2e;
    --ps-lime: #8cd03c;
    --ps-sage: #e4f1dc;
    --ps-line: #dce3d5;
}

/* Portfolio Wrapper */
.ps-portfolio-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   Enterprise Control Console: Filter & Search Toolbar
   ========================================================================== */
.ps-portfolio-filter-bar.ps-toolbar-console {
    background: #ffffff;
    border: 1px solid #dce4d6;
    border-radius: 18px;
    padding: 16px 20px;
    margin-bottom: 36px;
    box-shadow: 0 4px 20px rgba(31, 122, 46, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.ps-portfolio-filter-bar.ps-toolbar-console:focus-within {
    border-color: #b8cead;
    box-shadow: 0 8px 30px rgba(31, 122, 46, 0.08);
}

.ps-toolbar-primary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ps-media-filter-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ps-cluster-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #55624e;
    text-transform: uppercase;
    background: #edf3e8;
    padding: 5px 9px;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

/* Media Segmented Control */
.ps-media-segmented-control {
    display: inline-flex;
    align-items: center;
    background: #f1f5ee;
    padding: 4px;
    border-radius: 30px;
    gap: 2px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.ps-media-filter-btn {
    border: none;
    background: transparent;
    color: #4b5446;
    padding: 7px 15px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.ps-media-filter-btn .ps-filter-svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ps-media-filter-btn:hover {
    color: var(--ps-forest);
    background: rgba(255, 255, 255, 0.7);
}

.ps-media-filter-btn:hover .ps-filter-svg {
    opacity: 1;
    transform: scale(1.1);
}

.ps-media-filter-btn.active {
    background: var(--ps-forest);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(31, 122, 46, 0.3);
}

.ps-media-filter-btn.active .ps-filter-svg {
    opacity: 1;
    color: var(--ps-lime);
}

/* Category Filter Row */
.ps-toolbar-category-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #edf1e9;
    flex-wrap: wrap;
}

.ps-category-pills-scroll {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.ps-filter-btn {
    border: 1px solid #d5dfce;
    background: #ffffff;
    color: #3b4637;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    line-height: 1.3;
}

.ps-filter-btn:hover {
    background: #edf5e8;
    border-color: #9ecc8f;
    color: var(--ps-forest);
    transform: translateY(-1px);
}

.ps-filter-btn.active {
    background: var(--ps-forest);
    border-color: var(--ps-forest);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(31, 122, 46, 0.28);
}

/* Enterprise Real-Time Search Box */
.ps-search-wrap {
    position: relative;
    min-width: 260px;
    flex: 0 1 340px;
}

.ps-portfolio-search-input {
    width: 100%;
    height: 40px;
    padding: 0 36px 0 38px;
    border: 1px solid #d5dfce;
    border-radius: 30px;
    background: #fbfdf9;
    font-size: 12px;
    font-weight: 500;
    color: var(--ps-ink);
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.ps-portfolio-search-input:focus {
    border-color: var(--ps-forest);
    background: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(31, 122, 46, 0.15);
}

.ps-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #798674;
    pointer-events: none;
}

.ps-clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: #e4ece0;
    color: #4b5447;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.ps-clear-search-btn:hover {
    background: #1f7a2e;
    color: #ffffff;
}

/* ==========================================================================
   Dynamic Responsive Portfolio Grid
   ========================================================================== */
.ps-portfolio-grid {
    display: grid;
    gap: 28px;
    position: relative;
    transition: opacity 0.25s ease;
}

.ps-portfolio-grid.ps-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ps-portfolio-grid.ps-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ps-portfolio-grid.ps-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .ps-portfolio-grid.ps-cols-3,
    .ps-portfolio-grid.ps-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .ps-portfolio-filter-bar.ps-toolbar-console {
        padding: 14px 16px;
        gap: 12px;
    }
    .ps-toolbar-primary-row {
        flex-direction: column;
        align-items: stretch;
    }
    .ps-media-segmented-control {
        width: 100%;
        overflow-x: auto;
        justify-content: space-between;
    }
    .ps-media-filter-btn {
        flex: 1 1 auto;
        justify-content: center;
        padding: 7px 10px;
        font-size: 11px;
    }
    .ps-search-wrap {
        width: 100%;
        flex: 1 1 100%;
    }
    .ps-toolbar-category-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .ps-portfolio-grid,
    .ps-portfolio-grid.ps-cols-2,
    .ps-portfolio-grid.ps-cols-3,
    .ps-portfolio-grid.ps-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   State-of-the-Art Portfolio Card Component
   ========================================================================== */
.ps-card-item {
    background: #ffffff;
    border: 1px solid #dfe6db;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.25s ease;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.ps-card-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(31, 122, 46, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    border-color: rgba(31, 122, 46, 0.45);
}

.ps-card-inner-box {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ps-card-image-wrap {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #eff3eb;
}

.ps-card-img-anchor {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.ps-card-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.ps-card-item:hover .ps-card-poster-img {
    transform: scale(1.08);
}

/* Subtle image cinematic vignette overlay */
.ps-card-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 26, 14, 0.4) 0%, transparent 40%, rgba(16, 26, 14, 0.72) 100%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* Hover "Explore Project" Pill */
.ps-card-hover-pill {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ps-forest);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    z-index: 3;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.ps-card-item:hover .ps-card-hover-pill {
    opacity: 1;
    transform: translateY(0);
}

.ps-card-placeholder-photo {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4ec, #dce8d4);
    color: var(--ps-forest);
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
}

/* Frosted Glass Badges */
.ps-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(18, 28, 16, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ps-lime);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.ps-card-media-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(18, 28, 16, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.ps-card-featured-star {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #ffffff;
    color: #eab308;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    z-index: 2;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Card Content Area */
.ps-card-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #ffffff;
}

.ps-card-meta-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #63705d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    font-weight: 700;
}

.ps-card-meta-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ps-green);
    flex-shrink: 0;
}

.ps-card-client-tag {
    color: var(--ps-forest);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ps-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
    color: #1a2418;
    letter-spacing: -0.4px;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ps-card-item:hover .ps-card-title,
.ps-card-title a:hover {
    color: var(--ps-forest);
}

.ps-title-link {
    color: inherit;
    text-decoration: none;
}

.ps-card-excerpt {
    font-size: 13px;
    color: #5c6657;
    line-height: 1.6;
    margin: 0 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.ps-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #edf1ea;
    padding-top: 14px;
    margin-top: auto;
}

.ps-card-status {
    font-size: 11px;
    font-weight: 700;
    color: var(--ps-forest);
    background: #eaf3e5;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ps-card-status::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ps-forest);
}

.ps-card-link-action {
    font-size: 12px;
    font-weight: 700;
    color: var(--ps-forest);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ps-card-item:hover .ps-card-link-action {
    gap: 9px;
    color: #278634;
}

/* Loading Overlay & Spinner */
.ps-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(247, 248, 244, 0.75);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    gap: 12px;
    min-height: 200px;
}

.ps-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(58, 169, 53, 0.2);
    border-top-color: var(--ps-green);
    border-radius: 50%;
    animation: psSpin 0.75s linear infinite;
}

@keyframes psSpin {
    to { transform: rotate(360deg); }
}

/* Load More Button */
.ps-load-more-btn {
    cursor: pointer;
    min-width: 180px;
    justify-content: center;
}

.ps-load-more-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Lightbox Modal */
.ps-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ps-lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.ps-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 24, 18, 0.92);
    backdrop-filter: blur(8px);
}

.ps-lightbox-dialog {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ps-lightbox-img-wrap {
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ps-lightbox-caption {
    color: #fff;
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
    font-weight: 500;
}

.ps-lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

.ps-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 3;
}

.ps-lightbox-nav:hover {
    background: var(--ps-green);
    transform: translateY(-50%) scale(1.1);
}

.ps-lightbox-nav.prev {
    left: -70px;
}

.ps-lightbox-nav.next {
    right: -70px;
}

@media (max-width: 768px) {
    .ps-lightbox-nav.prev {
        left: 10px;
    }
    .ps-lightbox-nav.next {
        right: 10px;
    }
    .ps-lightbox-close {
        top: 10px;
        right: 15px;
    }
}

/* ==========================================================================
   VIDEO PORTFOLIO STYLES — Play Button, Badges, Filter Bar, & Modal Player
   ========================================================================== */

/* Media Filter Pills */
.ps-portfolio-filter-cluster {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.ps-media-filter-pills {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #edf3e9;
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--ps-line);
}

.ps-media-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--ps-ink);
    padding: 7px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.ps-media-filter-btn:hover {
    color: var(--ps-forest);
    background: rgba(255, 255, 255, 0.6);
}

.ps-media-filter-btn.active {
    background: var(--ps-forest);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(31, 122, 46, 0.3);
}

.ps-media-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Video Card Thumbnail Play Button Overlay */
.ps-card-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(31, 122, 46, 0.92);
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    padding: 0;
}

.ps-card-play-btn svg {
    margin-left: 3px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.ps-play-ripple {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid rgba(58, 169, 53, 0.6);
    opacity: 0.8;
    pointer-events: none;
    animation: psPlayPulse 2.2s infinite ease-out;
}

@keyframes psPlayPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.22);
        opacity: 0.2;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.ps-portfolio-card:hover .ps-card-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    background: var(--ps-green);
    border-color: #ffffff;
    box-shadow: 0 14px 30px rgba(58, 169, 53, 0.45);
}

.ps-card-play-btn:focus-visible {
    outline: 3px solid var(--ps-lime);
    outline-offset: 4px;
}

/* Card Media Type Badge */
.ps-card-media-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.ps-badge-video {
    background: rgba(31, 122, 46, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.ps-badge-mixed {
    background: rgba(26, 44, 26, 0.92);
    border: 1px solid rgba(140, 208, 60, 0.45);
    color: #eafbea;
}

.ps-badge-mixed svg {
    color: var(--ps-lime);
}

/* Single Portfolio Video Showcase Player */
.portfolio-video-showcase {
    background: #111a12;
    color: #ffffff;
    padding: 70px max(38px, calc((100vw - 1324px)/2));
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-video-showcase-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.portfolio-video-showcase .section-head {
    margin-bottom: 28px;
}

.portfolio-video-showcase .section-head h2 {
    color: #ffffff;
}

.portfolio-video-player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.portfolio-video-player-wrapper iframe,
.portfolio-video-player-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.portfolio-video-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    flex-wrap: wrap;
}

.portfolio-video-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--ps-lime);
}

.portfolio-video-description-block {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 18px 24px;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   VIDEO MODAL POPUP (16:9 Aspect Ratio, Accessible, Autoplay on click)
   ========================================================================== */

.ps-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.ps-video-modal.active {
    display: flex;
}

.ps-video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 18, 12, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: psFadeIn 0.25s ease-out;
}

.ps-video-modal-dialog {
    position: relative;
    z-index: 2;
    width: 92vw;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    animation: psScaleUp 0.28s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes psFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes psScaleUp {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ps-video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.ps-video-modal-title {
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ps-video-modal-category {
    background: var(--ps-forest);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ps-video-modal-close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-video-modal-close:hover {
    background: var(--ps-green);
    transform: rotate(90deg);
}

.ps-video-modal-close:focus-visible {
    outline: 2px solid var(--ps-lime);
}

.ps-video-modal-player-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Perfect 16:9 ratio */
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ps-video-modal-player-wrap iframe,
.ps-video-modal-player-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}

.ps-video-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding: 0 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    flex-wrap: wrap;
    gap: 10px;
}

.ps-video-modal-desc {
    max-width: 70%;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.ps-video-modal-permalink {
    color: var(--ps-lime);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.ps-video-modal-permalink:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .ps-video-modal-dialog {
        width: 96vw;
    }
    .ps-video-modal-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .ps-video-modal-desc {
        max-width: 100%;
    }
    .ps-card-play-btn {
        width: 50px;
        height: 50px;
    }
}
