/* ===================================
   REAL PROJECTS SECTION
   Client Portfolio Showcase
   =================================== */

.real-projects {
    position: relative;
    padding: 8rem 0;
    background: linear-gradient(180deg,
            rgba(10, 10, 15, 0.95) 0%,
            rgba(15, 12, 25, 0.98) 50%,
            rgba(10, 10, 15, 0.95) 100%);
    overflow: hidden;
}

.real-projects .projects-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.real-projects .grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

/* Section Header */
.real-projects .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.real-projects .section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.2), rgba(0, 212, 255, 0.2));
    border: 1px solid rgba(217, 70, 239, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #d946ef;
    margin-bottom: 1.5rem;
}

.real-projects .section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.real-projects .title-main {
    display: block;
    color: #fff;
}

.real-projects .title-sub {
    display: block;
    background: linear-gradient(135deg, #d946ef, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.real-projects .section-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Project Showcase Grid */
.project-showcase {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Showcase Card */
.showcase-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.showcase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217, 70, 239, 0.5), rgba(0, 212, 255, 0.5), transparent);
}

.showcase-card:hover {
    border-color: rgba(217, 70, 239, 0.3);
    box-shadow:
        0 20px 60px rgba(217, 70, 239, 0.1),
        0 0 100px rgba(0, 212, 255, 0.05);
    transform: translateY(-5px);
}

/* Device Showcase Visual */
.showcase-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 400px;
}

/* Desktop Device in Showcase - Floating Screen Style */
.showcase-visual .device-desktop-showcase {
    position: relative;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(217, 70, 239, 0.3),
        0 0 30px rgba(217, 70, 239, 0.15),
        0 0 60px rgba(0, 212, 255, 0.1),
        0 25px 50px rgba(0, 0, 0, 0.4);
    transform: perspective(1000px) rotateX(2deg) rotateY(-3deg);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: floatDesktop 6s ease-in-out infinite;
}

.showcase-visual .device-desktop-showcase:hover {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1.02);
    box-shadow:
        0 0 0 2px rgba(217, 70, 239, 0.5),
        0 0 40px rgba(217, 70, 239, 0.25),
        0 0 80px rgba(0, 212, 255, 0.15),
        0 30px 60px rgba(0, 0, 0, 0.5);
}

@keyframes floatDesktop {

    0%,
    100% {
        transform: perspective(1000px) rotateX(2deg) rotateY(-3deg) translateY(0);
    }

    50% {
        transform: perspective(1000px) rotateX(2deg) rotateY(-3deg) translateY(-10px);
    }
}

/* Hide the old bezel elements */
.showcase-visual .device-desktop-showcase .screen-bezel {
    display: none;
}

.showcase-visual .device-desktop-showcase .screen-content {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
}

.showcase-visual .device-desktop-showcase .screen-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.showcase-visual .device-desktop-showcase .screen-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Hide stand and base for floating effect */
.showcase-visual .device-desktop-showcase .device-stand,
.showcase-visual .device-desktop-showcase .device-base {
    display: none;
}

/* Phone Device in Showcase */
.showcase-visual .device-phone-showcase {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 140px;
    background: #1a1a2e;
    border-radius: 24px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    padding: 8px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 212, 255, 0.15);
    transform: translateX(20px) translateY(-20px);
    z-index: 2;
}

.showcase-visual .device-phone-showcase .phone-notch {
    width: 60px;
    height: 20px;
    background: #0a0a0f;
    border-radius: 0 0 12px 12px;
    margin: 0 auto 4px;
}

.showcase-visual .device-phone-showcase .phone-screen {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 9/19;
}

.showcase-visual .device-phone-showcase .phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Content Side */
.showcase-content {
    position: relative;
    z-index: 1;
}

.showcase-content .project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.showcase-content .project-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.showcase-content .client-location {
    color: #ffcc00 !important;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.15), rgba(255, 153, 0, 0.1)) !important;
    border-color: rgba(255, 204, 0, 0.4) !important;
    font-weight: 600;
    font-size: 0.95rem !important;
    padding: 0.6rem 1.2rem !important;
    position: relative;
}

.showcase-content .client-location::before {
    content: '🌍';
    margin-right: 0.3rem;
}

/* International Client Badge */
.international-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.2), rgba(255, 140, 0, 0.15));
    border: 2px solid rgba(255, 204, 0, 0.5);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #ffcc00;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.15);
    animation: badgePulse 3s ease-in-out infinite;
    margin-bottom: 1rem;
}

.international-badge .flag-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(180deg, #c60b1e 0%, #c60b1e 25%, #ffc400 25%, #ffc400 75%, #c60b1e 75%, #c60b1e 100%);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.international-badge .country-name {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
}

.international-badge .country-name {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.international-badge .intl-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-top: 2px;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(255, 204, 0, 0.15);
    }

    50% {
        box-shadow: 0 4px 25px rgba(255, 204, 0, 0.3);
    }
}

/* Gallery Button - Match Visit Button Size */
.btn-gallery {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-gallery:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(217, 70, 239, 0.5);
    color: #d946ef;
    transform: translateY(-2px);
}

.btn-gallery svg {
    width: 20px;
    height: 20px;
}

/* Showcase Actions Container */
.showcase-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 480px) {
    .showcase-actions {
        flex-direction: column;
    }

    .showcase-actions .btn-visit,
    .showcase-actions .btn-gallery {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   PROJECT LIGHTBOX / GALLERY
   =================================== */

.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.project-lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.lightbox-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: lightboxIn 0.3s ease;
}

@keyframes lightboxIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.lightbox-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lightbox-badge {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.2), rgba(255, 140, 0, 0.15));
    border: 1px solid rgba(255, 204, 0, 0.4);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffcc00;
    letter-spacing: 0.05em;
}

.lightbox-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.lightbox-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Switcher in Lightbox */
.lightbox-lang-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.lightbox-lang-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-lang-btn.active {
    color: #d946ef;
    background: rgba(217, 70, 239, 0.15);
}

.lightbox-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 77, 77, 0.2);
    border-color: rgba(255, 77, 77, 0.5);
    color: #ff4d4d;
}

.lightbox-content {
    flex: 1;
    display: flex;
    gap: 2rem;
    overflow: hidden;
}

.lightbox-main-image {
    flex: 2;
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-main-image img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.lightbox-caption h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lightbox-caption p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
}

.lightbox-thumbnails {
    flex: 0.5;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.lightbox-thumb {
    flex-shrink: 0;
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.lightbox-thumb:hover {
    opacity: 0.9;
}

.lightbox-thumb.active {
    border-color: #d946ef;
    opacity: 1;
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.lightbox-nav svg {
    width: 20px;
    height: 20px;
}

.lightbox-nav:hover {
    background: rgba(217, 70, 239, 0.4);
    border-color: rgba(217, 70, 239, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-nav.prev {
    left: 1rem;
}

.lightbox-nav.next {
    right: 1rem;
}

/* Image Counter */
.lightbox-image-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

/* Responsive Lightbox */
@media (max-width: 768px) {
    .project-lightbox {
        padding: 0;
    }

    .lightbox-container {
        max-height: 100vh;
        max-height: 100dvh;
        height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .lightbox-header {
        padding: 0.75rem 1rem;
        margin-bottom: 0;
        flex-wrap: nowrap;
        gap: 0.5rem;
        border-radius: 0;
        background: rgba(0, 0, 0, 0.95);
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-shrink: 0;
    }

    .lightbox-header-left {
        gap: 0.5rem;
        flex: 1;
        min-width: 0;
    }

    .lightbox-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.6rem;
        flex-shrink: 0;
    }

    .lightbox-title {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lightbox-lang-switcher {
        display: flex;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 6px;
        overflow: hidden;
        flex-shrink: 0;
    }

    .lightbox-lang-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.7rem;
    }

    .lightbox-lang-btn svg {
        width: 14px;
        height: 10px;
    }

    .lightbox-close {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .lightbox-content {
        flex-direction: column;
        gap: 0;
        overflow-y: auto;
        flex: 1;
        background: rgba(0, 0, 0, 0.98);
    }

    /* Main image container becomes flex column */
    .lightbox-main-image {
        flex: none;
        position: relative;
        display: flex;
        flex-direction: column;
        min-height: auto;
        max-height: none;
        border-radius: 0;
        background: #000;
    }

    /* Image wrapper - create a container for just the image */
    .lightbox-main-image img.lightbox-img-target {
        width: 100%;
        max-height: 35vh;
        object-fit: contain;
        border-radius: 0;
        flex-shrink: 0;
    }

    .lightbox-nav {
        width: 32px;
        height: 32px;
        background: rgba(0, 0, 0, 0.8);
        top: calc(17.5vh);
        /* Half of 35vh image height */
    }

    .lightbox-nav svg {
        width: 14px;
        height: 14px;
    }

    .lightbox-nav.prev {
        left: 0.25rem;
    }

    .lightbox-nav.next {
        right: 0.25rem;
    }

    /* Caption - Moved below the image with static positioning */
    .lightbox-caption {
        position: static !important;
        order: 10;
        /* Force it to the end */
        padding: 1rem;
        background: rgba(15, 15, 25, 1);
        border-radius: 0;
        border-top: 2px solid rgba(217, 70, 239, 0.4);
        margin: 0;
        flex-shrink: 0;
    }

    .lightbox-caption h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        color: #fff;
    }

    .lightbox-caption p {
        font-size: 0.85rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.85);
        margin: 0;
    }

    .lightbox-image-counter {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        z-index: 5;
    }

    .lightbox-thumbnails {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.75rem;
        gap: 0.5rem;
        flex: none;
        background: rgba(0, 0, 0, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        flex-shrink: 0;
    }

    .lightbox-thumb {
        min-width: 55px;
        max-width: 55px;
        aspect-ratio: 16/10;
        border-radius: 4px;
    }
}


.showcase-content h3 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.showcase-content>p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    padding: 0.4rem 0.9rem;
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.15), rgba(0, 212, 255, 0.15));
    border: 1px solid rgba(217, 70, 239, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #d946ef;
}

/* Custom Features */
.custom-features {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.custom-features h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-features li {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    padding-left: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.custom-features li .feature-icon {
    flex-shrink: 0;
}

/* Visit Button */
.showcase-content .btn-visit {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #d946ef, #00d4ff);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(217, 70, 239, 0.3);
}

.showcase-content .btn-visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(217, 70, 239, 0.4);
}

.showcase-content .btn-visit svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.showcase-content .btn-visit:hover svg {
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1024px) {
    .showcase-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }

    .showcase-visual {
        min-height: 300px;
    }

    .showcase-visual .device-desktop-showcase {
        max-width: 400px;
    }

    .showcase-visual .device-phone-showcase {
        width: 100px;
        transform: translateX(10px) translateY(-10px);
    }
}

@media (max-width: 768px) {
    .real-projects {
        padding: 5rem 0;
    }

    .showcase-card {
        padding: 1.5rem;
    }

    .showcase-visual {
        min-height: 250px;
    }

    .showcase-visual .device-desktop-showcase {
        max-width: 100%;
    }

    .showcase-visual .device-phone-showcase {
        width: 80px;
        border-radius: 16px;
        padding: 4px;
    }

    .showcase-content .project-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .showcase-content .project-meta span {
        width: fit-content;
    }
}