/* ============================================================
   DEVICE MOCKUP (project page)
   The project's main picture on a laptop screen, with a phone in
   front showing the same picture. Overrides the plain picture frame
   in project.php (.gallery-main).
   ============================================================ */

.project-details-hero .gallery-main.device-showcase {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    align-self: center;
    min-height: 0;
    padding: 10px 7% 40px 0;
    background: none;
    box-shadow: none;
    overflow: visible;
    border-radius: 0;
}

/* ---------- Laptop ---------- */
.device-laptop {
    position: relative;
    width: 100%;
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.device-showcase:hover .device-laptop {
    transform: translateY(-4px);
}

.laptop-screen {
    position: relative;
    aspect-ratio: 16 / 10;
    padding: 2.2% 1.6% 1.6%;
    border-radius: 18px 18px 6px 6px;
    background: linear-gradient(145deg, #2b2f33, #0d0f11);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Camera dot in the top bezel */
.laptop-screen::before {
    content: '';
    position: absolute;
    top: 0.7%;
    left: 50%;
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
    border-radius: 50%;
    background: #3a3f44;
    box-shadow: inset 0 0 0 2px #1b1e21;
}

.project-details-hero .gallery-main.device-showcase .laptop-screen img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: cover;
    object-position: top center;
    border-radius: 4px;
    background: #0f221d;
    transition: opacity 0.3s ease;
}

/* Soft glare across the screen */
.laptop-screen::after {
    content: '';
    position: absolute;
    inset: 2.2% 1.6% 1.6%;
    border-radius: 4px;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 38%);
    pointer-events: none;
}

.laptop-base {
    position: relative;
    width: 114%;
    left: -7%;
    height: 16px;
    border-radius: 2px 2px 14px 14px;
    background: linear-gradient(180deg, #e6e9ec 0%, #b9bec4 55%, #8d9298 100%);
}

/* Finger notch at the front of the base */
.laptop-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 16%;
    height: 6px;
    transform: translateX(-50%);
    border-radius: 0 0 8px 8px;
    background: #a3a8ae;
}

/* ---------- Phone ---------- */
.device-phone {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 25%;
    aspect-ratio: 9 / 19;
    padding: 1% 0.9%;
    border-radius: 28px;
    background: linear-gradient(145deg, #2b2f33, #0d0f11);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 215, 0, 0.18);
    animation: device-float 5s ease-in-out infinite;
}

.device-phone .phone-notch {
    position: absolute;
    top: 2.6%;
    left: 50%;
    width: 24%;
    height: 2.2%;
    transform: translateX(-50%);
    border-radius: 20px;
    background: #0d0f11;
    z-index: 1;
}

.project-details-hero .gallery-main.device-showcase .device-phone img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: cover;
    object-position: top left;
    border-radius: 22px;
    background: #0f221d;
    transition: opacity 0.3s ease;
}

.project-details-hero .gallery-main.device-showcase img:hover {
    transform: none;
}

@keyframes device-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.project-details-hero .gallery-main.device-showcase .expand-icon {
    right: 26%;
    bottom: 54px;
}

@media (max-width: 768px) {
    .project-details-hero .gallery-main.device-showcase {
        padding: 6px 9% 30px 2%;
    }

    .laptop-screen {
        border-radius: 12px 12px 4px 4px;
    }

    .laptop-base {
        height: 10px;
    }

    .device-phone {
        width: 26%;
        border-radius: 16px;
    }

    .project-details-hero .gallery-main.device-showcase .device-phone img {
        border-radius: 11px;
    }

    .project-details-hero .gallery-main.device-showcase .expand-icon {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .device-phone {
        animation: none;
    }
}
