/* Стили для карточек новостей */
.news-list-title {
    font-size: 48px;
    font-weight: 700;
    margin: 48px 0 32px 0;
    color: #23345A;
}
.news-card-link {
    text-decoration: none;
    color: inherit;
}
.news-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    background: #f8f9fa;
    min-height: 340px;
    cursor: pointer;
}
.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    transition: transform 0.4s;
}
.news-card .card-body {
    position: absolute;
    left: 0; right: 0;
    bottom: 0;
    z-index: 3;
    background: transparent;
    padding: 24px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 120px;
    /* В спокойном состоянии опускаем на высоту 8 строк описания */
    transform: translateY(calc(1.5rem * 8 + 23px));
    transition: transform 0.4s cubic-bezier(.4,0,.2,1), background 0.4s, padding 0.4s;
}
.news-card .news-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 0;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    z-index: 2;
    transition: height 0.4s;
    opacity: 1;
}
.news-card:hover .news-overlay {
    height: 100%;
    transition: height 0.4s;
}
.news-card:hover .card-img-top {
    transform: translateY(-100%);
    transition: transform 0.4s;
}
.news-card:hover {
    box-shadow: 0 4px 24px rgba(74, 144, 226, 0.2);
}
.news-card .card-title,
.news-card .card-text,
.news-card .mb-2 {
    position: relative;
    z-index: 3;
    color: #23345A;
    transition: color 0.3s, transform 0.4s;
}
.news-card:hover .card-title,
.news-card:hover .card-text,
.news-card:hover .mb-2 {
    color: #fff;
    transition: color 0.3s, transform 0.4s;
}
.news-card .mb-2 {
    color: #6c757d;
    transition: color 0.3s, transform 0.4s;
    font-size: 15px;
    margin-bottom: 8px;
}
.news-card:hover .card-body {
    justify-content: flex-start;
    padding-top: 32px;
    padding-bottom: 20px;
    /* На hover возвращаемся в исходное положение */
    transform: translateY(0);
}
.news-card:hover .mb-2, .news-card:hover .card-title {
    color: #fff !important;
    transform: translateY(0);
}
.news-card .mb-2 {
    color: #6c757d;
    font-size: 15px;
    margin-bottom: 8px;
}
.news-card .card-title {
    margin-bottom: 10px;
    font-size: 1.2rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 2.6em;
    min-height: 2.6em; /* Всегда ровно 2 строки по высоте */
}
.news-card .card-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
    overflow: hidden;
    margin-top: 12px;
    margin-bottom: 8px;
    color: #4a90e233;
    line-height: 1.5;
    min-height: calc(1.5em * 8); /* Всегда 8 строк по высоте */
}
.news-card:hover .card-text { color: #fff; }
.news-card:hover {
    box-shadow: 0 4px 24px #4a90e233;
}

.news-hero-title-wrap {
    display: flex;
    align-items: center;
    height: 100%;
}
.news-hero-title-wrap h1 {
    margin-top: 100px;
    font-size: clamp(36px, 10vw, 74px);
    font-weight: 700;
    color: #fff;
    text-align: left;
    z-index: 2;
    position: relative;
}
.news-hero-breadcrumb {
    position: absolute;
    bottom: 32px;
    width: 100%;
    text-align: left;
    z-index: 2;
}
.news-hero-breadcrumb .breadcrumb {
    background: transparent;
    color: #fff;
    margin-bottom: 0;
}
.news-hero-breadcrumb .breadcrumb-item,
.news-hero-breadcrumb .breadcrumb-item a {
    color: #fff;
    font-size: 18px;
    transition: opacity 0.3s;
}
.news-hero-breadcrumb .breadcrumb-item a:hover {
    opacity: 0.8;
}
.news-hero-breadcrumb .breadcrumb-item.active {
    color: #fff;
    opacity: 0.8;
}

/* Детальная страница новости */
.news-detail-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 120px 0 18px 0;
    color: #23345A;
    letter-spacing: -1px;
}
.news-detail-date {
    color: #6c757d;
    font-size: 1.1rem;
    margin-top: 40px;
}
.news-detail-breadcrumb {
    margin-bottom: 72px;
    margin-top: 50px;
}
.news-detail-breadcrumb .breadcrumb-item,
.news-detail-breadcrumb .breadcrumb-item a {
    color: #23345A;
    font-size: 18px;
    transition: opacity 0.3s;
    text-decoration: none;
}
.news-detail-breadcrumb .breadcrumb-item a:hover {
    opacity: 0.7;
    text-decoration: underline;
}
.news-detail-breadcrumb .breadcrumb-item.active {
    color: #23345A;
    opacity: 0.7;
}
.news-detail-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    background: #e9ecef;
}
.news-detail-img-row {
    display: flex;
    gap: 18px;
    margin-bottom: 36px;
}
.news-detail-img-row img {
    flex: 1 1 0;
    max-width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 12px;
    background: #e9ecef;
}
.news-detail-flex {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 36px;
}
.news-detail-flex-img {
    flex: 0 0 340px;
    max-width: 340px;
}
.news-detail-flex-img img {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: 12px;
    background: #e9ecef;
}
.news-detail-flex-text {
    flex: 1 1 0;
}
.swiper {
    width: 100%;
    border-radius: 12px;
}
.swiper-slide img {
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: #e9ecef;
}
.news-detail-content {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-top: 0;
}
@media (max-width: 900px) {
    .news-detail-flex { flex-direction: column; gap: 24px; }
    .news-detail-flex-img, .news-detail-flex-img img { max-width: 100%; height: auto; }
}
