/**
 * More Work Widget
 * CSS File
 */


/* Widget wrapper */

.cinematic-more-work-wrapper {
    position: relative;
    max-width: 80rem;
    margin: 0 auto;
    perspective: 1000px;
    /* Add perspective for 3D animations */
}


/* Heading section */

.cinematic-more-work-heading {
    margin-bottom: 30px;
}

.cinematic-more-work-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 15px 0;
    font-weight: 600;
    color: #fff;
}

.cinematic-more-work-description {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}


/* Grid layout - Two column with offset */

.cinematic-work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 1.5rem;
    min-height: 300px;
    /* Ensure minimum height during animation */
    will-change: opacity;
    /* Optimize for animation */
}


/* Create offset for the odd columns */

.cinematic-work-grid .cinematic-work-item:nth-child(2n+1) {
    margin-top: 50px;
}


/* Item styling */

.cinematic-work-item {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    overflow: hidden;
    background-color: unset;
    box-shadow: none;
    will-change: transform, opacity;
    /* Optimize for animation */
    transform-style: preserve-3d;
    /* Better performance for 3D transforms */
    backface-visibility: hidden;
    /* Prevent flickering on some browsers */
}


/* Remove default transition since GSAP will handle this */

.cinematic-work-item:hover {
    transform: none;
}


/* Image container */

.cinematic-work-image {
    position: relative;
    height: 430px !important;
    overflow: hidden;
    border-radius: 0;
    will-change: transform, opacity;
    /* Optimize for animation */
    transform: translateZ(0);
    /* Force hardware acceleration */
    backface-visibility: hidden;
}

.cinematic-work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Remove transition since GSAP will handle this */
    transform-origin: center center;
    will-change: transform;
    transform: translateZ(0);
}


/* Top Right Text Styling */

.cinematic-work-top-right-text {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 15px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    pointer-events: none;
    will-change: transform, opacity;
    transform: translateZ(0);
}


/* Layout specific styles */

.cinematic-work-layout-top_right .cinematic-work-item {
    position: relative;
}


/* Content styling */

.cinematic-work-content {
    padding: 0.75rem 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: #fff;
    background-color: unset;
    border-top: none;
    will-change: transform, opacity;
    /* Optimize for animation */
    transform: translateZ(0);
}


/* Title styling */

.cinematic-work-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    will-change: opacity, transform;
}

.cinematic-work-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cinematic-work-title a:hover {
    color: rgba(255, 255, 255, 0.8);
}


/* Category styling */

.cinematic-work-category {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 0.01em;
    border-bottom: 1px solid #ffffff1a;
    will-change: opacity, transform;
}


/* Date styling */

.cinematic-work-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: auto;
    display: flex;
    align-items: center;
    will-change: opacity, transform;
}

.cinematic-work-date .date-label {
    margin-right: 0.5rem;
}

.cinematic-work-date .date-value {
    opacity: 0.8;
}


/* Hover effects */


/* Zoom effect */

.cinematic-work-hover-zoom .cinematic-work-image img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cinematic-work-hover-zoom .cinematic-work-item:hover .cinematic-work-image img {
    transform: scale(1.1);
}


/* Overlay effect */

.cinematic-work-hover-overlay .cinematic-work-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.cinematic-work-hover-overlay .cinematic-work-item:hover .cinematic-work-image::before {
    opacity: 1;
}


/* No items message */

.cinematic-work-no-items {
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px;
    text-align: center;
    border-radius: 4px;
    font-size: 1.1rem;
    font-style: italic;
}


/* Editor specific styles */

.elementor-editor-active .cinematic-work-item,
.elementor-editor-active .cinematic-work-image,
.elementor-editor-active .cinematic-work-content,
.elementor-editor-active .cinematic-work-title,
.elementor-editor-active .cinematic-work-category,
.elementor-editor-active .cinematic-work-date {
    transform: none !important;
    opacity: 1 !important;
}


/* Fix widget in editor */

.elementor-widget-cinematic-more-work {
    min-height: 300px;
}


/* Responsive styles */

@media (max-width: 1024px) {
    .cinematic-work-grid {
        grid-gap: 1rem;
    }
    .cinematic-work-grid .cinematic-work-item:nth-child(2n+1) {
        margin-top: 30px;
    }
}

@media (max-width: 767px) {
    .cinematic-work-grid {
        grid-template-columns: 1fr;
    }
    .cinematic-work-grid .cinematic-work-item:nth-child(2n+1) {
        margin-top: 0;
    }
    .cinematic-work-image {
        height: 300px !important;
    }
    .cinematic-work-content {
        padding: 0.5rem 0.75rem;
    }
    .cinematic-work-title {
        font-size: 1rem;
    }
}