/* Подключение шрифтов */
@font-face {
    font-family: 'Magistral';
    src: url('../fonts/Magistral.TTF') format('truetype');
    font-weight: normal;
}
@font-face {
    font-family: 'Magistral';
    src: url('../fonts/Magistral Bold.TTF') format('truetype');
    font-weight: bold;
}
@font-face {
    font-family: 'Magistral';
    src: url('../fonts/Magistral Black.TTF') format('truetype');
    font-weight: 900;
}

:root {
    --primary-green: #00ff00;
    --primary-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-gray: #b3b3b3;
    --card-bg: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ПЛАВНЫЙ СКРОЛЛ ПРИ КЛИКЕ ПО ЯКОРЯМ */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* Отступ, чтобы шапка не перекрывала заголовки */
}

body {
    font-family: 'Magistral', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    padding: 20px 0;
    background-color: rgba(26, 26, 26, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--primary-green);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo__img {
    height: 50px;
}

.nav__link {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 30px;
    font-weight: bold;
    transition: color 0.3s;
}

.nav__link:hover {
    color: var(--primary-green);
}

/* Секции */
.about {
    padding: 80px 0;
    text-align: center;
}

.about__title {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
}

.about__title span {
    color: var(--primary-green);
}

.about__text {
    font-size: 20px;
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 30px;
    color: var(--primary-green);
    text-transform: uppercase;
}

/* Проекты и Карусель */
.projects {
    padding: 60px 0;
}

.projects__wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.projects__carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 0 20px 0; /* Отступы, чтобы тени/рамки не обрезались */
    scroll-behavior: smooth;
    scrollbar-width: none; 
    -ms-overflow-style: none;
    width: 100%;
}

.projects__carousel::-webkit-scrollbar {
    display: none;
}

.project-card {
    /* Карточка занимает ровно треть контейнера минус отступы */
    flex: 0 0 calc(33.333% - 14px); 
    min-width: 280px; /* Чтобы на мобилках не были слишком узкими */
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card__img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.project-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.project-card__title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
}

.project-card__status {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-0 { background: #555; color: #ccc; }
.status-1 { background: var(--primary-green); color: #000; }
.status-2 { background: #ffaa00; color: #000; }
.status-3 { background: #0099ff; color: #fff; }

.project-card__descr {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 15px;
    flex-grow: 1;
    /* Ограничиваем текст 3 строками для аккуратности */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    border-top: 1px solid #444;
    padding-top: 15px;
}

.project-card__years {
    color: var(--text-gray);
}

.project-card__link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: bold;
}

/* Кнопки карусели */
.carousel-btn {
    background: var(--primary-green);
    color: var(--primary-dark);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, background 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.carousel-btn:hover {
    background: #fff;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn--prev {
    left: -22px; /* Выносим за пределы контейнера */
}

.carousel-btn--next {
    right: -22px;
}

/* Партнеры */
/* Партнеры */
.partners {
    padding: 60px 0 100px;
}

.partners__grid {
    display: grid;
    /* 3 колонки одинаковой ширины на ПК */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
}

.partner-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    /* Уменьшил горизонтальные отступы, чтобы логотипам было больше места */
    padding: 30px 20px; 
    border-radius: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%; /* Карточка занимает всю ширину ячейки сетки */
    height: 100%; /* Если текст в одной карточке больше, все выровняются по высоте */
    box-sizing: border-box;
}

.partner-card:hover {
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    transform: scale(1.05);
}

.partner-logo {
    width: 100%; /* Логотип подстраивается под ширину карточки */
    max-width: 180px; /* Но не больше 180px */
    max-height: 80px;
    object-fit: contain; /* Картинка не искажается */
    filter: grayscale(100%) brightness(200%);
    transition: filter 0.3s ease;
}

.partner-card:hover .partner-logo {
    filter: grayscale(0%) brightness(100%);
}

/* Подвал */
/* Подвал */
.footer {
    padding: 30px 0;
    border-top: 1px solid #333;
    color: var(--text-gray);
    font-size: 14px;
}

/* Контейнер подвала для выравнивания по краям */
.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer__text {
    margin: 0;
}

/* Блок с иконками */
.footer__socials {
    display: flex;
    gap: 15px;
}

/* Стили для самих ссылок-иконок */
.social-link {
    color: var(--text-gray); /* По умолчанию серые */
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link svg {
    width: 28px;
    height: 28px;
}

/* Эффект при наведении: цвет становится неоново-зеленым, иконка чуть увеличивается */
.social-link:hover {
    color: var(--primary-green);
    transform: translateY(-3px);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .project-card {
        flex: 0 0 calc(50% - 10px); 
    }
    
    /* На планшетах делаем 2 колонки партнёров */
    .partners__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    .about__title {
        font-size: 28px;
    }
    .project-card {
        flex: 0 0 85%;
    }
    .carousel-btn--prev { left: 5px; }
    .carousel-btn--next { right: 5px; }
    
    /* На телефонах делаем 1 колонку — карточки на всю ширину */
    .partners__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Немного уменьшаем отступы внутри карточек на телефоне */
    .partner-card {
        padding: 20px 15px;
    }
    
    .partner-logo {
        max-height: 60px; /* Чуть меньше логотип на мобильных */
    }

   .footer__container {
        flex-direction: column; /* Текст и иконки становятся друг под другом */
        text-align: center;
    }

    .footer__socials {
        margin-top: 10px; /* Небольшой отступ от текста до иконок */
    }
}