@import url('variables.css');



/* Header */


/* Hero Section */
.hero {
    background: linear-gradient(rgba(15, 33, 77, 0.8), rgba(15, 33, 77, 0.8)),
        url('https://infokam.su/wp-content/uploads/2023/07/KPK.jpg');
    background-size: cover;
    background-position: center 70%;
    color: var(--text);
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--text);
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--blue);
}

/* Programs Section */
.programs {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--dark-blue);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent);
}

/* Обновленные стили для миниатюрных карточек */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.program-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.program-img {
    height: 120px;
    /* Уменьшенная высота изображения */
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.leader-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 15px 0;
    border: 3px solid #f5f5f5;
    align-self: center;
}

.program-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.program-content h3 {
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: 8px;
    color: var(--dark-blue);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.program-qualification {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.program-content p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    flex-grow: 1;
}

.program-content .btn {
    padding: 6px 15px;
    font-size: 0.8rem;
    align-self: flex-start;
    margin-top: auto;
}

.program-qualification {
    position: relative;
}

.program-qualification:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #333;
    color: white;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
}

/* Стили для описания */
.program-description {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 12px;
    transition: all 0.4s ease;
    overflow: hidden;
}

.program-description.short {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 3em;
    /* 2 строки */
}

.program-description.full {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
}

.program-card.expanded .program-description.short {
    display: none;
}

.program-card.expanded .program-description.full {
    max-height: 300px;
    /* Достаточно для контента */
    opacity: 1;
    padding-top: 10px;
}

.program-card:hover {
    transform: translateY(-3px);
}



/* Адаптация для разных экранов */
@media (min-width: 1200px) {
    .programs-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

@media (max-width: 768px) {
    .programs-grid {
        grid-template-columns: 1fr;
    }

    .program-img {
        height: 150px;
    }
}

/* About Section */
.about-container {
    margin: 5rem;
}

.about {
    padding: 80px 0;
    background-color: var(--banana);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    color: var(--dark-blue);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--dark-blue);
    font-weight: 500;
}

.about-img {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.about-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Первые две картинки (квадратные) */
.about-img img:not(.horizontal-img) {
    aspect-ratio: 1 / 1;
    /* Сохраняем квадратную форму */
}

/* Горизонтальная картинка */
.about-img .horizontal-img {
    grid-column: span 2;
    /* Занимает две колонки */
    aspect-ratio: 16 / 9;
    /* Соотношение сторон как у широкоэкранного видео */
}

/* News Section */
/* News Section */
.news {
    max-width: 1400px !important;
    padding: 80px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Добавляем overflow: hidden для всего контейнера */
}

.news-img {
    height: 100px;
    /* Увеличиваем высоту изображения */
    background-color: var(--banana);
    background-size: cover;
    background-position: center;
    min-height: 100px;
    /* Минимальная высота */
}

.content-wrapper {
    padding: 20px;
    /* Увеличиваем отступы */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Добавляем равномерные отступы между элементами */
}

.news-date {
    color: var(--accent);
    font-size: 0.9rem;
    margin: 0;
    /* Убираем margin */
    padding: 0;
    /* Убираем padding */
}

.news-content {
    flex-grow: 1;
    /* Позволяем контенту занимать доступное пространство */
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Равномерные отступы между заголовком и текстом */
}

.news-content h3 {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.4;
    color: #333;
}

.news-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    flex-grow: 1;
    /* Позволяем тексту занимать доступное пространство */
}

.content-wrapper a {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    margin-top: auto;
    /* Прижимаем ссылку к низу */
    transition: background-color 0.3s ease;
    text-align: center;
}

.content-wrapper a:hover {
    background-color: var(--dark-blue);
}

/* Contact Section */
.contact {
    padding: 20px 0;
    background-color: var(--dark-blue);
    color: var(--text);
}

.contact-info {
    text-align: center;
}

.contact-info h2 {
    margin-bottom: 20px;
}

.contact-info p {
    /* margin-bottom: 30px; */

    opacity: 0.9;
}

.contact-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
}

.contact-details div {
    width: 49%;
    display: flex;
    align-items: center;
    margin: 10px 0px;
}




.contact-details i {
    font-size: 1.2rem;
    color: var(--accent);
    margin-right: 15px;
    width: 20px;
}



@media (max-width: 996px) {
    .contact-details div {
        width: 100%;
        justify-content: center;
    }

    .contact-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }

    .about-container {
        margin: 0rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-img {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .about-img img:not(.horizontal-img) {
        aspect-ratio: 4 / 3;
        /* Более прямоугольная форма на мобильных */
    }

    .about-img .horizontal-img {
        grid-column: span 1;
        aspect-ratio: 16 / 9;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    /* Адаптация для маленьких мобильных */
    @media (max-width: 480px) {
        .about-img img:not(.horizontal-img) {
            aspect-ratio: 1 / 1;
        }
    }
}