/**
 * CK Project Slider Styles
 * Version: 1.0.0
 */

/* Section Container */
.ck-project-section {
    overflow: hidden;
}

/* Header Styles */
.ck-project-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.ck-project-subtitle {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
}

.ck-project-title {
    font-size: 42px;
    font-weight: 400;
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 25px;
    font-family: 'Times New Roman', Georgia, serif;
}

.ck-project-title em {
    color: #EAC863;
    font-style: italic;
}

.ck-project-description {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Slider Wrapper */
.ck-project-wrapper {
    position: relative;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
}

.ck-project-slider {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ck-project-track {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Slide */
.ck-project-slide {
    position: absolute;
    width: 700px;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.6) translateX(0);
    pointer-events: none;
}

/* Left/Previous Slide - Partially visible */
.ck-project-slide.prev {
    opacity: 1;
    transform: scale(0.70) translateX(-900px);
    z-index: 1;
    pointer-events: auto;
    cursor: pointer;
}

/* Center/Active Slide */
.ck-project-slide.active {
    opacity: 1;
    transform: scale(1) translateX(0);
    z-index: 10;
    pointer-events: auto;
}

/* Right/Next Slide - Partially visible */
.ck-project-slide.next {
    opacity: 1;
    transform: scale(0.70) translateX(900px);
    z-index: 1;
    pointer-events: auto;
    cursor: pointer;
}

/* Project Card */
.ck-project-card {
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
}

/* Image Wrapper with Before/After Effect */
.ck-project-image-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 16px;
    overflow: hidden;
}

.ck-project-image-wrapper:hover {
    cursor: pointer;
}


.ck-project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
}

.ck-before-image {
    z-index: 2;
    opacity: 1;
}

.ck-after-image {
    z-index: 1;
    opacity: 1;
}

/* Hover Effect - Show After Image */
.ck-project-slide.active .ck-project-image-wrapper:hover .ck-before-image {
    opacity: 0;
}

/* Side slides don't show hover effect */
.ck-project-slide.prev .ck-project-image-wrapper,
.ck-project-slide.next .ck-project-image-wrapper {
    filter: brightness(0.5);
}

/* Project Info Section */
.ck-project-info {
    padding: 30px 10px 0;
}

.ck-project-name {
    font-size: 24px;
    font-weight: 500;
    color: #EAC863;
    margin: 0 0 10px;
    font-family: 'Lora', Georgia, "Times New Roman", serif
}

.ck-project-content-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.ck-project-excerpt {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    color: #fff;
    margin: 0;
    font-weight: 400;
    max-width: 550px;
    margin-bottom: 20px;
}

/* Arrow Link Button */
.ck-project-link {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ck-project-link:hover {
    background: #EAC863;
    border-color: #EAC863;
    color: #0a0a0a;
    transform: scale(1.1);
}

.ck-project-link svg {
    width: 20px;
    height: 20px;
}

/* Hide info on side slides */
.ck-project-slide.prev .ck-project-info,
.ck-project-slide.next .ck-project-info {
    opacity: 0;
    visibility: hidden;
}

/* Navigation Dots */
.ck-project-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
}

.ck-project-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.ck-project-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.ck-project-dot.active {
    background: #EAC863;
    transform: scale(1.3);
}

/* No Projects Message */
.ck-no-projects {
    text-align: center;
    color: #888;
    padding: 40px;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .ck-project-slide {
        width: 600px;
    }

    .ck-project-slide.prev {
        transform: scale(0.7) translateX(-650px);
    }

    .ck-project-slide.next {
        transform: scale(0.7) translateX(650px);
    }

    .ck-project-image-wrapper {
        height: 380px;
    }
}

@media (max-width: 1200px) {
    .ck-project-slide {
        width: 500px;
    }

    .ck-project-slide.prev {
        transform: scale(0.65) translateX(-550px);
    }

    .ck-project-slide.next {
        transform: scale(0.65) translateX(550px);
    }

    .ck-project-slider {
        height: 520px;
    }

    .ck-project-image-wrapper {
        height: 320px;
    }

    .ck-project-title {
        font-size: 36px;
    }
}

@media (max-width: 992px) {
    .ck-project-section {
        padding: 0;
    }

    .ck-project-header {
        margin-bottom: 40px;
    }

    .ck-project-title {
        font-size: 30px;
    }

    .ck-project-slide {
        width: 450px;
    }

    .ck-project-slide.prev {
        transform: scale(0.6) translateX(-480px);
    }

    .ck-project-slide.next {
        transform: scale(0.6) translateX(480px);
    }

    .ck-project-slider {
        height: 480px;
    }

    .ck-project-image-wrapper {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .ck-project-section {
        padding: 0;
    }

    .ck-project-title {
        font-size: 26px;
    }

    .ck-project-description {
        font-size: 14px;
    }

    .ck-project-slider {
        height: 450px;
    }

    .ck-project-slide {
        width: 90%;
        max-width: 400px;
    }

    /* Hide side slides on mobile */
    .ck-project-slide.prev,
    .ck-project-slide.next {
        opacity: 0;
        pointer-events: none;
    }

    .ck-project-slide.active {
        transform: scale(1) translateX(0);
    }

    .ck-project-image-wrapper {
        height: 260px;
    }

    .ck-project-name {
        font-size: 18px;
    }

    .ck-project-excerpt {
        font-size: 13px;
    }

    .ck-project-link {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .ck-project-section {
        padding: 0;
    }

    .ck-project-header {
        margin-bottom: 30px;
    }

    .ck-project-subtitle {
        font-size: 11px;
        margin-bottom: 15px;
    }

    .ck-project-title {
        font-size: 22px;
    }

    .ck-project-slider {
        height: 400px;
    }

    .ck-project-image-wrapper {
        height: 220px;
        border-radius: 12px;
    }

    .ck-project-info {
        padding: 35px 0 0;
    }

    .ck-project-name {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .ck-project-content-row {
        gap: 15px;
    }

    .ck-project-excerpt {
        font-size: 12px;
        line-height: 1.5;
    }

    .ck-project-link {
        width: 40px;
        height: 40px;
    }

    .ck-project-link svg {
        width: 16px;
        height: 16px;
    }

    .ck-project-dots {
        margin-top: 25px;
        gap: 10px;
    }

    .ck-project-dot {
        width: 6px;
        height: 6px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .ck-project-dot:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .ck-project-dot.active:hover {
        background: #EAC863;
    }

    /* For touch devices, use tap instead of hover for image swap */
    .ck-project-slide.active .ck-project-image-wrapper.touched .ck-before-image {
        opacity: 0;
    }
}


/* ===============================
   PROJECT LISTING GRID
=============================== */
.ck-project-filter-wrap {
    display: flex;
    justify-content: center;
}

.ck-project-filter {
    display: inline-flex;
    gap: 30px;
    justify-content: center;
    margin: 0 auto 50px;
    background-color: #141414;
    border-radius: 15px;
    padding: 20px;
}

.ck-project-filter button {
    background: transparent;
    border: none;
    color: #5a5a5a;
    padding: 8px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.ck-project-filter button.active {
    background: #EAC863;
    color: #000;
    font-weight: 600;

}

.ck-project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.ck-project-grid-card {
    padding-bottom: 15px;

}

.ck-project-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.ck-project-pagination button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .4);
    background: transparent;
    color: #fff;
}

@media (max-width: 768px) {
    .ck-project-grid {
        grid-template-columns: 1fr;
    }
}


/* Before / After hover for listing */
.ck-project-grid-card .ck-project-image-wrapper {
    position: relative;
    overflow: hidden;
}

.ck-project-grid-card .ck-project-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.45s ease;
}

.ck-project-grid-card .ck-after-image {
    opacity: 0;
}

/* Hover = show AFTER image */
.ck-project-grid-card:hover .ck-after-image {
    opacity: 1;
}

.ck-project-grid-card:hover .ck-before-image {
    opacity: 0;
}


/* Smooth AJAX transition */
.ck-project-listing-content {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.ck-project-listing-content.is-loading {
    opacity: 0;
    transform: translateY(15px);
}

.ck-project-listing-content.is-loaded {
    opacity: 1;
    transform: translateY(0);
}