/* Feature Showcase Styles */
.feature-showcase {
    padding: 120px 0;
    background: #ffffff;
    overflow: hidden;
}

.showcase-row {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 120px;
}

.showcase-row:nth-child(even) {
    flex-direction: row-reverse;
}

.showcase-row:last-child {
    margin-bottom: 0;
}

.showcase-text {
    flex: 1;
    min-width: 300px;
}

.showcase-text h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.showcase-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.showcase-image {
    flex: 2;
    position: relative;
    min-width: 300px;
}

/* Minimalist Browser Frame */
.browser-frame {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: transform 0.4s ease;
    cursor: zoom-in;
    /* Indicate clickable */
}

.browser-frame:hover {
    transform: translateY(-5px);
}

.browser-header {
    height: 36px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 6px;
}

.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
}

.browser-dot.red {
    background: #fee2e2;
}

.browser-dot.yellow {
    background: #fef3c7;
}

.browser-dot.green {
    background: #dcfce7;
}

.browser-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* Hero Composition */
.hero-composition {
    position: relative;
    max-width: 900px;
    margin: 60px auto 0;
    height: 400px;
    /* Adjust based on image ratios */
}

/* Back Layer (Screen) */
.hero-screen {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    z-index: 1;
}

/* Front Layer (Mobile) */
.hero-mobile {
    position: absolute;
    bottom: -40px;
    right: 10%;
    width: 25%;
    /* Mobile width relative to container */
    z-index: 2;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 4px solid #1e293b;
    /* Dark frame for mobile */
    overflow: hidden;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.hero-mobile:hover {
    transform: scale(1.02);
}

.hero-mobile img {
    width: 100%;
    display: block;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    /* Dark slate overlay */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    /* Hidden state */
    transition: opacity 0.3s ease;
    padding: 40px;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 968px) {
    .showcase-row {
        flex-direction: column !important;
        /* Stack everything on smaller screens */
        gap: 40px;
        margin-bottom: 80px;
        text-align: center;
    }

    .showcase-text {
        text-align: center;
    }

    .hero-composition {
        height: auto;
        margin-top: 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .hero-screen {
        position: relative;
        left: 0;
        transform: none;
        width: 100%;
    }

    .hero-mobile {
        position: relative;
        bottom: 0;
        right: 0;
        width: 50%;
        margin-top: -50px;
        /* Slight overlap */
    }
}

/* Smartphone Adjustments (< 640px) */
@media (max-width: 640px) {

    /* Larger Mobile Hero Image */
    .hero-mobile {
        width: 75%;
        margin-top: -40px;
    }

    /* Full Width Showcase Images */
    .showcase-image {
        min-width: 100%;
        width: 100%;
    }

    /* Adjust Browser Frame to fit snugly */
    .browser-frame {
        border-radius: 8px;
    }

    /* Reduce gaps */
    .showcase-row {
        gap: 32px;
        margin-bottom: 60px;
    }

    /* Lightbox Mobile Optimization */
    .lightbox {
        padding: 0;
    }

    .lightbox-content {
        max-width: 100%;
        width: 100%;
        border-radius: 0;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
    }
}