/* ==========================================================================
   NEXT PROJECT SHOWCASE MODAL - SPLIT SCREEN PREMIUM DESIGN
   ========================================================================== */

:root {
    --modal-bg: rgba(10, 10, 10, 0.98);
    --modal-glass: blur(25px) saturate(180%);
    --modal-accent: #0fff00;
    --modal-text: #fff;
    --modal-secondary: #999;
}

.project-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-bg);
    backdrop-filter: var(--modal-glass);
    -webkit-backdrop-filter: var(--modal-glass);
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 40px;
}

.project-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.project-modal-container {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    max-height: 850px;
    background: #111;
    border-radius: 40px;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.project-modal-overlay.active .project-modal-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.project-modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    font-size: 20px;
}

.project-modal-close:hover {
    background: var(--modal-accent);
    color: #000;
    transform: rotate(90deg);
}

/* Left: Visual Section */
.project-modal-visual {
    flex: 1.2;
    position: relative;
    background: #000;
    overflow: hidden;
}

.project-modal-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.project-modal-overlay.active .project-modal-visual img {
    transform: scale(1.05);
}

/* Right: Content Section */
.project-modal-content {
    flex: 0.8;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #111, #0a0a0a);
    position: relative;
    overflow-y: auto;
}

/* Custom Scrollbar for Content */
.project-modal-content::-webkit-scrollbar {
    width: 4px;
}
.project-modal-content::-webkit-scrollbar-thumb {
    background: var(--modal-accent);
    border-radius: 10px;
}

.pm-category {
    font-size: 13px;
    font-weight: 800;
    color: var(--modal-accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    display: block;
}

.pm-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 950;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

.pm-description {
    font-size: 17px;
    color: #bbb;
    line-height: 1.8;
    margin-bottom: 40px;
}

.pm-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pm-meta-item h5 {
    font-size: 11px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.pm-meta-item p {
    font-size: 15px;
    color: #fff;
    font-weight: 600;
}

/* Tech Pills */
.pm-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 50px;
}

.pm-tech-tag {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    color: #888;
}

/* CTA Button */
.pm-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background: var(--modal-accent);
    color: #000;
    text-decoration: none;
    padding: 6px 6px 6px 30px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    width: fit-content;
    margin-top: 25px;
    overflow: hidden;
    z-index: 1;
    border: 1px solid var(--modal-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pm-cta .cta-text {
    flex: 1;
    z-index: 3;
    margin-right: 20px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.pm-cta .cta-icon-box {
    width: 40px;
    height: 40px;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 3;
    position: relative;
}

.pm-cta::before {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    width: 40px;
    height: 40px;
    background: #000;
    border-radius: 50%;
    transform: translateY(-50%) scale(1);
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
}

.pm-cta:hover {
    color: #fff;
    border-color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.pm-cta:active {
    transform: translateY(0) scale(0.96);
}

.pm-cta:hover .cta-text {
    color: #fff;
    transform: translateX(3px);
}

.pm-cta:hover::before {
    transform: translateY(-50%) scale(15);
}

.pm-cta:hover .cta-icon-box {
    background: var(--modal-accent);
    color: #000;
    transform: rotate(-45deg);
}

.pm-cta i {
    font-size: 14px;
}

/* Navigation Buttons (Bottom) */
.pm-nav {
    position: absolute;
    bottom: 30px;
    right: 60px;
    display: flex;
    gap: 15px;
}

.pm-nav-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.pm-nav-btn:hover {
    background: var(--modal-accent);
    color: #000;
    border-color: var(--modal-accent);
}

/* Gallery Navigation Dots (Boxes) */
.pm-gallery-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 18px;
    border-radius: 100px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s;
}

/* Gallery Thumbnails */
.pm-gallery-thumb {
    width: 60px;
    height: 45px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
    background: #000;
}

.pm-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pm-gallery-thumb:hover {
    opacity: 0.8;
    border-color: rgba(255, 255, 255, 0.5);
}

.pm-gallery-thumb.active {
    opacity: 1;
    border-color: var(--modal-accent);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.pm-gallery-thumb.active img {
    transform: scale(1.1);
}

/* Video Container Styles */
.pm-video-container {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-video-container iframe {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
    .project-modal-container {
        max-width: 95%;
        max-height: 90vh;
    }
    .project-modal-content {
        padding: 60px 40px;
    }
}

@media (max-width: 992px) {
    .project-modal-overlay {
        padding: 20px;
    }
    .project-modal-container {
        flex-direction: column;
        max-height: 90vh;
        border-radius: 25px;
        overflow-y: auto;
    }
    .project-modal-visual {
        flex: 0 0 400px;
        min-height: auto;
        position: sticky;
        top: 0;
        z-index: 5;
    }
    .project-modal-content {
        flex: 1;
        padding: 40px 30px 100px;
        background: #111;
        overflow-y: visible;
    }
    .pm-title {
        font-size: 32px;
    }
    .project-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);
    }
    .pm-gallery-nav {
        bottom: 15px;
        transform: translateX(-50%) scale(0.85);
    }
}

@media (max-width: 576px) {
    .project-modal-visual {
        flex: 0 0 280px;
    }
    .pm-title {
        font-size: 26px;
        letter-spacing: -1px;
    }
    .pm-meta-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 20px;
    }
    .project-modal-overlay {
        padding: 10px;
    }
    .pm-cta {
        width: 100%;
        min-width: 100%;
        padding: 10px 10px 10px 20px;
        box-sizing: border-box;
    }
    .pm-cta .cta-text {
        font-size: 12px;
        margin-right: 10px;
    }
    .pm-nav {
        bottom: 25px;
        right: 50%;
        transform: translateX(50%);
        width: 100%;
        justify-content: center;
        padding: 0 30px;
        box-sizing: border-box;
    }
    .pm-nav-btn {
        width: 50px;
        height: 50px;
    }
    .pm-gallery-nav {
        bottom: 10px;
        gap: 5px;
        padding: 5px 10px;
        transform: translateX(-50%) scale(0.75);
    }
    .pm-gallery-thumb {
        width: 50px;
        height: 38px;
    }
}
