/* ==========================================================================
   Service Projects Carousel — 2 cards per row, wide & elegant
   ========================================================================== */

.service-projects {
    position: relative;
    overflow: hidden;
}

.service-projects__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.service-projects__header h2 {
    margin: 0;
}

.service-projects__nav {
    display: flex;
    gap: 0.5rem;
}

.service-projects__btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.service-projects__btn:hover {
    border-color: var(--color-primary, #2E8B57);
    color: var(--color-primary, #2E8B57);
    background: rgba(46, 139, 87, 0.04);
    box-shadow: 0 2px 8px rgba(46, 139, 87, 0.12);
}

.service-projects__btn:active {
    transform: scale(0.95);
}

.service-projects__btn:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

/* Track */
.service-projects__track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

/* Card — 2 per row */
.project-carousel-card {
    flex: 0 0 calc((100% - 1.5rem) / 2);
    min-width: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.project-carousel-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
    color: inherit;
    text-decoration: none;
}

/* Card image — taller aspect for bigger visual impact */
.project-carousel-card__img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f3f5;
}

.project-carousel-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-carousel-card:hover .project-carousel-card__img img {
    transform: scale(1.04);
}

.project-carousel-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ced4da;
    font-size: 3rem;
}

/* Overlay gradient for readability */
.project-carousel-card__img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.2) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.project-carousel-card:hover .project-carousel-card__img::after {
    opacity: 1;
}

/* Year badge */
.project-carousel-card__year {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 2rem;
    letter-spacing: 0.03em;
    z-index: 1;
}

/* Card body */
.project-carousel-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-carousel-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta info */
.project-carousel-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.project-carousel-card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.project-carousel-card__meta-item i {
    font-size: 0.9rem;
    color: var(--color-primary, #2E8B57);
    opacity: 0.75;
}

/* Service tags */
.project-carousel-card__services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.project-carousel-card__service-tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    background: rgba(46, 139, 87, 0.07);
    color: var(--color-primary, #2E8B57);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "Все проекты" link */
.service-projects__all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-primary, #2E8B57);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: gap 0.25s ease;
}

.service-projects__all-link:hover {
    gap: 0.7rem;
    color: var(--color-primary, #2E8B57);
}

/* Dots */
.service-projects__dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
}

.service-projects__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-projects__dot.is-active {
    background: var(--color-primary, #2E8B57);
    width: 24px;
    border-radius: 4px;
}

/* Responsive — tablet stays 2 */
@media (max-width: 575.98px) {
    .project-carousel-card {
        flex: 0 0 100%;
    }

    .service-projects__track {
        gap: 1rem;
    }

    .service-projects__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .service-projects__nav {
        align-self: flex-end;
    }

    .project-carousel-card__body {
        padding: 1rem 1.125rem 1.125rem;
    }

    .project-carousel-card__title {
        font-size: 1rem;
    }
}
