/* Изолированные переменные для новой версии */
:root {
    --v2-red: #e30613;
    --v2-red-rgb: 227, 6, 19;
    --v2-text: #2c2c2c;
    --v2-bg-gray: #f5f7fa;
    --v2-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.v2-portfolio-section {
    background-color: var(--v2-bg-gray);
    padding: 80px 0;
    width: 100%;
}

.v2-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.v2-section-title {
    font-family: 'Ubuntu', sans-serif;
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    color: var(--v2-text);
}

/* Сетка с новыми именами */
.v2-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
}

/* Новая карточка v2 */
.v2-portfolio-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 20px; /* Более современное скругление */
    overflow: hidden;
    text-decoration: none !important;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    transition: var(--v2-transition);
    height: 100%;
}

.v2-card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 595 / 310;
    overflow: hidden;
    background: #e0e0e0;
}

.v2-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.v2-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.v2-card-title {
    font-family: 'Ubuntu', sans-serif;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--v2-text);
    margin-bottom: 25px;
    flex-grow: 1;
    transition: color 0.3s ease;
}

/* Кнопка v5 с уникальным именем */
.button-v5 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 12px 24px;
    background: #fff;
    color: #666 !important;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--v2-transition);
}

/* Эффекты при наведении */
.v2-portfolio-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(var(--v2-red-rgb), 0.15);
    border-color: rgba(var(--v2-red-rgb), 0.2);
}

.v2-portfolio-card:hover .v2-card-img {
    transform: scale(1.1);
}

.v2-portfolio-card:hover .v2-card-title {
    color: var(--v2-red);
}

.v2-portfolio-card:hover .button-v5 {
    background: var(--v2-red);
    color: #fff !important;
    border-color: var(--v2-red);
    box-shadow: 0 8px 15px rgba(var(--v2-red-rgb), 0.3);
}

/* Адаптив */
@media (max-width: 768px) {
    .v2-portfolio-grid {
        grid-template-columns: 1fr;
    }
}