/* Customer Cases Widget Styles */

/* Common Styles */
.svs-cases-container {
    width: 100%;
}

.case-client-name {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.case-title {
    font-size: 22px;
    font-weight: 700;
    margin: 10px 0;
    color: #333;
}

.case-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.case-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4CAF50;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.case-link:hover {
    gap: 12px;
}

/* ========== Template 1: Card Grid ========== */
.svs-template-card {
    display: grid;
}

.svs-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.svs-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.svs-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.svs-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.svs-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.svs-cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

.svs-template-card .svs-case-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.svs-template-card .svs-case-card[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

.svs-template-card .case-image {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.6s ease;
}

.svs-template-card .case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
}

.svs-template-card .case-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.svs-template-card .case-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.svs-template-card .case-content {
    padding: 20px;
}

.svs-template-card .case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.svs-template-card .case-tag {
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
}

/* Card Hover Effects */
.svs-case-card.hover-zoom:hover .case-image {
    transform: scale(1.1);
}

.svs-case-card.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.svs-case-card.hover-overlay:hover .case-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
}

/* ========== Template 2: Timeline ========== */
.svs-template-timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.svs-timeline {
    position: relative;
    padding: 40px 0;
}

/* Timeline Line */
.svs-align-alternate .svs-timeline::before,
.svs-align-left .svs-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
    transform: translateX(-50%);
}

.svs-align-left .svs-timeline::before {
    left: 30px;
}

.svs-align-right .svs-timeline::before {
    right: 30px;
    left: auto;
}

/* Timeline Item */
.timeline-item {
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline Date */
.timeline-date {
    position: absolute;
    top: 0;
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
}

.svs-align-alternate .timeline-left .timeline-date {
    right: calc(50% + 40px);
}

.svs-align-alternate .timeline-right .timeline-date {
    left: calc(50% + 40px);
}

.svs-align-left .timeline-date {
    left: 70px;
}

.svs-align-right .timeline-date {
    right: 70px;
}

/* Timeline Dot */
.timeline-dot {
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #e0e0e0;
    z-index: 2;
}

.svs-align-alternate .timeline-dot {
    left: 50%;
    transform: translateX(-50%);
}

.svs-align-left .timeline-dot {
    left: 21px;
}

.svs-align-right .timeline-dot {
    right: 21px;
}

/* Timeline Content */
.timeline-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.svs-align-alternate .timeline-left .timeline-content {
    width: calc(50% - 60px);
    margin-left: 0;
}

.svs-align-alternate .timeline-right .timeline-content {
    width: calc(50% - 60px);
    margin-left: calc(50% + 60px);
}

.svs-align-left .timeline-content {
    margin-left: 70px;
}

.svs-align-right .timeline-content {
    margin-right: 70px;
}

.timeline-content .case-logo {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 15px;
}

.timeline-content .case-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.timeline-content .case-image {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
}

.timeline-content .case-image img {
    width: 100%;
    display: block;
}

/* ========== Template 3: Masonry ========== */
.svs-template-masonry .masonry-grid {
    column-count: 3;
    column-gap: 30px;
}

.svs-template-masonry.svs-cols-2 .masonry-grid {
    column-count: 2;
}

.svs-template-masonry.svs-cols-4 .masonry-grid {
    column-count: 4;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.masonry-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.masonry-item .case-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.size-small .case-card {
    height: 250px;
}

.size-medium .case-card {
    height: 350px;
}

.size-large .case-card {
    height: 500px;
}

.masonry-item .case-image {
    width: 100%;
    height: 100%;
}

.masonry-item .case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.masonry-item .case-logo-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.masonry-item .case-logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.masonry-item .case-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.masonry-item .case-overlay-content .case-title,
.masonry-item .case-overlay-content .case-description,
.masonry-item .case-overlay-content .case-client-name {
    color: #fff;
}

.masonry-item:hover .case-overlay-content {
    transform: translateY(0);
}

.masonry-item:hover .case-image img {
    transform: scale(1.1);
}

.masonry-item .case-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #4CAF50;
    color: #fff;
    border-radius: 50%;
    margin-top: 10px;
}

.masonry-item .case-link i {
    font-size: 18px;
}

/* Adaptive sizing for 5-6 columns on desktop */
@media (min-width: 1025px) {

    .svs-cols-5 .svs-case-card .case-content,
    .svs-cols-6 .svs-case-card .case-content {
        padding: 15px;
    }

    .svs-cols-5 .case-title,
    .svs-cols-6 .case-title {
        font-size: 18px;
    }

    .svs-cols-5 .case-description,
    .svs-cols-6 .case-description {
        font-size: 13px;
    }

    .svs-cols-5 .case-logo,
    .svs-cols-6 .case-logo {
        width: 60px;
        height: 60px;
    }
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .svs-cols-tablet-1 {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .svs-cols-tablet-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .svs-cols-tablet-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .svs-cols-tablet-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .svs-cols-tablet-5 {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .svs-cols-tablet-6 {
        grid-template-columns: repeat(6, 1fr) !important;
    }

    .svs-template-masonry .masonry-grid {
        column-count: 2;
    }

    .svs-align-alternate .svs-timeline::before {
        left: 30px;
        transform: none;
    }

    .svs-align-alternate .timeline-left .timeline-content,
    .svs-align-alternate .timeline-right .timeline-content {
        width: calc(100% - 70px);
        margin-left: 70px;
    }

    .svs-align-alternate .timeline-left .timeline-date,
    .svs-align-alternate .timeline-right .timeline-date {
        left: 70px;
        right: auto;
    }

    .svs-align-alternate .timeline-dot {
        left: 21px;
        transform: none;
    }
}

@media (max-width: 768px) {
    .svs-cols-mobile-1 {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .svs-cols-mobile-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .svs-cols-mobile-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .svs-template-card .case-image {
        height: 250px;
    }

    .svs-template-card .case-logo {
        width: 60px;
        height: 60px;
    }

    .svs-template-masonry .masonry-grid {
        column-count: 1;
    }

    .timeline-content {
        padding: 20px;
    }

    .case-title {
        font-size: 18px;
    }
}

/* Elementor Editor */
.elementor-editor-active .svs-case-card,
.elementor-editor-active .timeline-item,
.elementor-editor-active .masonry-item {
    opacity: 1 !important;
    transform: translateY(0) !important;
}