.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Cards stacked vertically */
    gap: 30px;
    max-width: 850px;
    /* Widened from 650px */
    margin: 0 auto;
    padding: 20px 0;
}

.gallery-static-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gallery-static-card::after,
.workplace-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    transition: 0.8s;
    pointer-events: none;
    z-index: 3;
}

.gallery-static-card:hover::after,
.workplace-card:hover::after {
    left: 200%;
}

.gallery-static-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
    box-shadow: 0 15px 35px rgba(0, 168, 232, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-header i {
    font-size: 1.3rem;
    color: var(--primary-blue);
    /* Removed background, padding, border-radius */
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.gallery-comparison-wrapper {
    display: flex;
    flex-direction: row;
    /* Images side-by-side */
    align-items: center;
    gap: 12px;
    position: relative;
}

.comparison-image {
    flex: 1;
    /* Equal width for both images */
    height: 220px;
    /* Good height for side-by-side on desktop */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 4px solid var(--card-border);
    /* Removed background and box-shadow */
    transition: var(--transition-smooth);
}

.comparison-image:hover {
    border-color: var(--primary-blue);
}

.comparison-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: -webkit-optimize-contrast;
    filter: brightness(1.02) contrast(1.02);
}

.comparison-image.after img {
    filter: brightness(1.05) contrast(1.05) saturate(1.1);
}

.gallery-static-card:hover .comparison-image img {
    transform: scale(1.08);
}

.status-badge {
    position: absolute;
    top: 15px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

.status-badge.before {
    background: rgba(230, 57, 70, 0.9);
    color: white;
    left: 15px;
}

.status-badge.after {
    background: rgba(46, 204, 113, 0.9);
    color: white;
    right: 15px;
}

.comparison-divider {
    color: var(--text-muted);
    font-size: 1.1rem;
    animation: slideRight 1.5s infinite ease-in-out;
}

@keyframes slideDown {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: translateY(4px);
        opacity: 1;
    }
}

@keyframes slideRight {

    0%,
    100% {
        transform: translateX(0);
        opacity: 0.5;
    }

    50% {
        transform: translateX(4px);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        max-width: 100%;
        padding: 5px;
        /* Tighter padding as in screenshot */
    }

    .gallery-static-card {
        padding: 15px;
        /* More padding inside card */
        border-radius: 18px;
    }

    .gallery-comparison-wrapper {
        flex-direction: row;
        /* KEEP SIDE BY SIDE AS PER SCREENSHOT */
        gap: 8px;
    }

    .comparison-image {
        height: 150px;
        /* Reduced height for mobile side-by-side */
        border-width: 3px;
        border-radius: 12px;
    }

    .comparison-divider {
        font-size: 0.9rem;
        animation: slideRight 1.5s infinite ease-in-out;
    }

    .card-header {
        margin-bottom: 15px;
        gap: 10px;
    }

    .card-header i {
        font-size: 1.1rem;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    .status-badge {
        font-size: 0.55rem;
        padding: 3px 6px;
        top: 8px;
        letter-spacing: 0.5px;
    }

    .status-badge.before {
        left: 8px;
    }

    .status-badge.after {
        right: 8px;
    }
}

@media (max-width: 480px) {
    .comparison-image {
        height: 120px;
        /* Even smaller for very small screens */
    }

    .gallery-grid {
        gap: 15px;
    }
}

/* Workplace Grid Styles */
.workplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.workplace-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 280px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    transition: var(--transition-smooth);
}

.workplace-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--primary-blue);
    box-shadow: 0 15px 35px rgba(0, 168, 232, 0.2);
}

.workplace-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: -webkit-optimize-contrast;
    filter: brightness(1.02) contrast(1.02);
}

.workplace-overlay {
    display: none;
}

/* Removed hover effect for overlay since it is hidden
.workplace-card:hover .workplace-overlay {
    opacity: 1;
}
*/

/*
.workplace-overlay span {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    transform: translateY(10px);
    transition: var(--transition-smooth);
}

.workplace-card:hover .workplace-overlay span {
    transform: translateY(0);
}
*/

.workplace-card:hover img {
    transform: scale(1.1);
}

/* Video Grid Styles */
@media (max-width: 992px) {
    .video-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .vertical-video {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .workplace-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 25px;
    }

    .workplace-card {
        height: 170px;
        border-radius: 15px;
    }

    .workplace-overlay span {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .workplace-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .workplace-card {
        height: 150px;
        border-radius: 12px;
    }
}


/* Video Container Styles - 16:9 Aspect Ratio */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill the frame perfectly */
}

@media (max-width: 768px) {
    .video-container {
        padding-bottom: 56.25%; /* Restore original ratio for mobile too */
        border-radius: 15px;
    }
}