/* ============================================
   ПРОЕКТЫ (projects_slider)
   Премиум портфолио-стиль
   ============================================ */

/* --- Общие --- */
.projects-section {
    padding: 50px 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.projects-container {
    max-width: 1740px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* --- Заголовочная часть --- */
.projects-header {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}

.projects-header-content {
    flex: 1;
    text-align: center;
    max-width: 820px;
    text-align: center;
}

.projects-badge {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #448DCB;
    margin-bottom: 14px;
    display: inline-block;
}

.projects-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 16px;
    color: #173E7A;
    letter-spacing: -0.5px;
}

.projects-title-accent {
    color: #448DCB;
}

.projects-divider {
    width: 60px;
    height: 3px;
    background: #448DCB;
    margin: 0 auto 20px;
    border-radius: 2px;
}

.projects-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: #5A6A7A;
    line-height: 1.6;
    max-width: 780px;
    margin: 0 auto;
}

/* --- Навигация (над слайдером) --- */
.projects-nav {
    display: flex;
    gap: 8px;
    justify-content: right;
    margin: 20px 0 16px;
    position: absolute;
    z-index: 5;
    right: 30px;
    top: 180px;
}

.projects-nav-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    border: 1px solid #E8EEF6;
    background: #ffffff;
    color: #173E7A;
    opacity: 0.7;
}

.projects-nav-btn:hover:not(:disabled) {
    transform: scale(1.08);
    opacity: 1;
}

.projects-nav-next {
    background: #448DCB;
    border-color: #448DCB;
    color: #ffffff;
}

.projects-nav-next:hover:not(:disabled) {
    background: #1558B0;
    border-color: #1558B0;
}

.projects-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
}

.projects-nav-btn svg {
    width: 18px;
    height: 18px;
}

/* --- Слайдер --- */
.projects-slider {
    overflow: hidden;
    margin-bottom: 28px;
}

.projects-slider-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    gap: 28px;
}

/* --- Карточка --- */
.project-card {
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid #EDF2F7;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: #2F80ED;
}
.project-card:hover a{
    text-decoration: none;
}
.project-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* --- Изображение --- */
.project-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 22px 22px 0 0;
    background: #f0f4fa;
    flex-shrink: 0;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

/* --- Контент карточки --- */
.project-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 16px;
}

/* Метаданные */
.project-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 22px;
}

.project-card-category {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #2E7CE6;
}

.project-card-icon {
    font-size: 16px;
    line-height: 1;
}

.project-card-year {
    font-size: 14px;
    font-weight: 400;
    color: #9AA7B8;
}

/* Заголовок */
.project-card-name {
    font-size: 28px;
    font-weight: 700;
    color: #173E7A;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 112px;
}

/* Описание */
.project-card-desc {
    font-size: 16px;
    font-weight: 400;
    color: #6F7C90;
    margin: 0;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Нижняя строка */
.project-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    margin-top: auto;
    padding-top: 0;
}

.project-card-more {
    font-size: 16px;
    font-weight: 600;
    color: #448DCB;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.project-card:hover .project-card-more {
    transform: translateX(3px);
}

.project-card-arrow {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #448DCB;
    border-radius: 999px;
    color: #ffffff;
    transition: transform 0.35s ease, background 0.35s ease;
    flex-shrink: 0;
}

.project-card-arrow svg {
    width: 18px;
    height: 18px;
    transition: transform 0.35s ease;
}

.project-card:hover .project-card-arrow {
    transform: scale(1.08);
    background: #1558B0;
}

.project-card:hover .project-card-arrow svg {
    transform: rotate(-5deg);
}

/* --- Нижняя строка: dots + кнопка в одной строке --- */
.projects-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* --- Пагинация (полосы) --- */
.projects-dots {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-shrink: 0;
}

.projects-dot {
    height: 6px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    padding: 0;
    background: #d0d8e3;
    transition: width 0.3s ease, background 0.3s ease;
    width: 12px;
}

.projects-dot.active {
    width: 32px;
    background: #448DCB;
}

.projects-dot:hover:not(.active) {
    background: #b0c4de;
}

/* ============================================ */
/* КНОПКА "СМОТРЕТЬ ВСЕ ПРОЕКТЫ" - ОБНОВЛЕНА */
/* ============================================ */
.projects-all {
    flex-shrink: 0;
}

.projects-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: #448DCB;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 95, 206, 0.25);
    text-decoration: none;
    white-space: nowrap;
}

.projects-all-btn:hover {
    background: #0F4A9E;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(26, 95, 206, 0.35);
    text-decoration: none;
    color: #FFFFFF;
}

.projects-all-btn:active {
    transform: translateY(0);
}

.projects-all-btn svg {
    width: 16px;
    height: 16px;
    stroke: #FFFFFF;
    transition: transform 0.3s ease;
}

.projects-all-btn:hover svg {
    transform: translateX(3px);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 1200px) {
    .projects-slide {
        flex: 0 0 calc(50% - 14px);
        max-width: calc(50% - 14px);
    }
    .projects-slider-track {
        gap: 14px;
    }
    .projects-title {
        font-size: 38px;
    }
}

@media (max-width: 992px) {
    .projects-container {
        padding: 0 20px;
    }
    .projects-section {
        padding: 60px 0;
    }
    .projects-title {
        font-size: 32px;
    }
    .projects-subtitle {
        font-size: 17px;
    }
    .projects-nav {
        margin: 16px 0 12px;
    }
    .project-card-image {
        height: 200px;
    }
    .project-card-name {
        font-size: 24px;
        max-height: 96px;
    }
    .project-card-desc {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .projects-container {
        padding: 0 16px;
    }
    .projects-section {
        padding: 40px 0;
    }
    .projects-title {
        font-size: 28px;
    }
    .projects-subtitle {
        font-size: 16px;
    }
    .projects-slide {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .projects-slider-track {
        gap: 16px;
    }
    
    /* ИСПРАВЛЕНИЕ: стрелки справа, чуть ниже */
    .projects-nav {
        position: relative;
        top: auto;
        right: auto;
        justify-content: flex-end;
        margin: 0 0 12px 0;
    }
    
    .projects-nav-btn {
        width: 42px;
        height: 42px;
    }
    .project-card-image {
        height: 200px;
    }
    .project-card-content {
        padding: 20px;
        gap: 12px;
    }
    .project-card-name {
        font-size: 22px;
        max-height: 88px;
    }
    .project-card-desc {
        font-size: 14px;
    }
    .project-card-arrow {
        width: 40px;
        height: 40px;
    }
    .project-card-arrow svg {
        width: 16px;
        height: 16px;
    }
    .projects-bottom {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .projects-dots {
        justify-content: center;
    }
    .projects-all-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    .projects-dot {
        width: 16px;
        height: 4px;
    }
    .projects-dot.active {
        width: 28px;
    }
    .projects-divider {
        width: 44px;
    }
    .projects-badge {
        font-size: 12px;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 576px) {
    .projects-title {
        font-size: 28px;
    }
    .projects-subtitle {
        font-size: 15px;
    }
    
    /* ИСПРАВЛЕНИЕ: стрелки справа, чуть ниже */
    .projects-nav {
        position: relative;
        top: auto;
        right: auto;
        justify-content: flex-end;
        margin: 0 0 12px 0;
    }

    .projects-nav-btn {
        width: 38px;
        height: 38px;
    }
    .projects-nav-btn svg {
        width: 14px;
        height: 14px;
    }
    .project-card-image {
        height: 180px;
    }
    .project-card-name {
        font-size: 20px;
        max-height: 80px;
    }
    .project-card-desc {
        font-size: 14px;
    }
    .project-card-content {
        padding: 16px;
        gap: 10px;
    }
    .project-card-arrow {
        width: 36px;
        height: 36px;
    }
    .project-card-arrow svg {
        width: 14px;
        height: 14px;
    }
    .projects-bottom {
        gap: 12px;
    }
    .projects-all-btn {
        padding: 8px 16px;
        font-size: 12px;
        gap: 8px;
        width: 100%;
        justify-content: center;
    }
    .projects-all-btn svg {
        width: 14px;
        height: 14px;
    }
    .projects-dot {
        width: 12px;
        height: 4px;
    }
    .projects-dot.active {
        width: 24px;
    }
    .projects-divider {
        width: 36px;
        height: 2px;
    }
}