/* Пример базового оформления */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

h1 {
    color: #1e3c72;
    text-align: center;
    margin-top: 50px;
}

p {
    text-align: center;
    font-size: 1.2rem;
    color: #333;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    background-color: #1e3c72;
    color: white;
}

.nav-link {
    color: #333;
    font-weight: 500;
}
.nav-link:hover {
    color: #f0ad4e;
}
.text-shadow {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}
.grayscale-hover {
    filter: grayscale(100%);
    transition: 0.3s;
}
.grayscale-hover:hover {
    filter: grayscale(0%);
}
footer {
    font-size: 0.95rem;
    line-height: 1.6;
}

.part-img {
    height: 160px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.part-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.swiper-slide {
    position: relative;
}
.language-switcher .lang-flag {
    font-size: 20px;
    transition: transform 0.2s ease;
    text-decoration: none;
}
.language-switcher .lang-flag:hover {
    transform: scale(1.2);
}
.dropdown-menu .dropdown-item {
    padding: 0.5rem 0;
    font-size: 1.5rem;
    transition: background 0.2s ease;
}
.dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}
/* app.css или <style> */
@media (max-width: 576px) {
    .banner-swiper .swiper-slide {
        background-size: contain !important;
        background-repeat: no-repeat;
        background-position: center center !important;
    }

    .banner-swiper .swiper-slide > div {
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
    }
}

html {
    scroll-behavior: smooth;
}

.totachi-btn {
    background-color: #c8102e !important;
    color: #fff !important;
    border: 2px solid #c8102e;
    border-radius: 25px;
    padding: 0px 20px !important;
    font-weight: 400;
    display: inline-block;
    text-decoration: none;
    transition: none;
}

@media (max-width: 768px) {
    .slider-overlay {
        background: none !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
    }

    .navbar-brand {
        display: none !important;
    }

    #mobileMenu {
        z-index: 9999;
    }
}

.text-ellipsis-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* количество строк */
    -webkit-box-orient: vertical;
    max-height: 3em; /* 2 строки по 1.5em */
}

.news-desc {
    font-size: 0.97rem !important;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 3.2em;
}

.banner-swiper .swiper-slide {
    min-height: 220px !important;
    height: 380px !important;
    max-height: 380px !important;
    overflow: hidden;
    background: #fff; /* если надо фон подложить */
}


/* Только для мобильных (до 768px) */
@media (max-width: 767.98px) {
    #mobileMenu {
        position: fixed !important;
        top: 64px;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        z-index: 1050;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 10px 24px rgba(0,0,0,0.14);
        background: #fff;
    }
    .swiper-mobile {
        padding-bottom: 32px;
    }
    .swiper-mobile .swiper-slide {
        width: 100%;
        min-width: 230px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border-radius: 16px !important;
        overflow: hidden;
        background: #fff;
    }
    .swiper-pagination {
    }
    /* Слайдер баннеров — убираем overlay для мобилки */
    .banner-swiper .bg-dark.bg-opacity-50 {
        background: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }
    .banner-swiper .swiper-slide {
        height: 180px !important;
        max-height: 180px !important;
        border-radius: 16px !important;
        background-size: contain !important;
        overflow: hidden;
        background: #fff; /* если надо фон подложить */
    }
    .banner-swiper .slide-content-mobile {
        display: none !important;
        background: rgba(0,0,0,0.14);
        border-radius: 18px;
        box-shadow: 0 2px 16px rgba(0,0,0,0.12);
        color: #fff;
        padding-bottom: 14px;
        z-index: 1;
        bottom: 0 !important;
    }
    .card .btn,
    .slide-content-mobile .btn {
        margin-bottom: 18px;
    }
    .card,
    .swiper-mobile .swiper-slide {
        border-radius: 16px !important;
        overflow: hidden;
    }
    .card-text.text-ellipsis-2 {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        min-height: 38px;
        max-height: 44px;
        line-height: 1.2;
    }
    .news-btn-gap {
        margin-top: 18px;
        margin-bottom: 14px;
    }
    .footer-socials,
    .footer-socials .d-flex {
        justify-content: center !important;
        text-align: center !important;
        margin-bottom: 1rem;
    }
    .footer-socials a {
        margin-left: 12px;
        margin-right: 12px;
    }
}
/* Для web увеличим отступ сверху у кнопки "Читать" внутри карточки */
    @media (min-width: 768px) {
    .news-btn-gap {
        margin-top: 32px !important; /* Можно больше/меньше по вкусу */
        margin-bottom: 14px;
    }
}

@media (max-width: 767.98px) {
    .footer-socials {
        text-align: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .footer-socials .d-flex {
        justify-content: center !important;
        gap: 16px;
    }
    .footer-socials a {
        margin-left: 8px;
        margin-right: 8px;
        font-size: 2rem !important;
    }
}
    .text-ellipsis-2 {
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* количество строк */
        -webkit-box-orient: vertical;
        max-height: 3em;
        text-overflow: ellipsis;
    }
    .text-ellipsis-2 {
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* количество строк */
        -webkit-box-orient: vertical;
        max-height: 3em; /* примерно 2 строки */
        text-overflow: ellipsis;
        word-break: break-word; /* перенос длинных слов */
        white-space: normal;
    }

.section-space {
    margin-top: 2rem;   /* увеличивай по вкусу */
    margin-bottom: 2rem;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);   /* 5 в ряд на десктопе */
    gap: 28px 36px;
    justify-items: center;
    align-items: center;
    margin: 0 auto;
    max-width: 1200px;
}
.partner-logo {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(10, 10, 60, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    height: 84px;
    width: 150px;
}
.partner-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Адаптив: планшет */
@media (max-width: 992px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px 20px;
    }
    .partner-logo {
        height: 70px;
        width: 120px;
    }
}
/* Мобильные: 2 в ряд */
@media (max-width: 600px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 8px;
    }
    .partner-logo {
        height: 54px;
        width: 90px;
        padding: 6px 5px;
    }
}
.nav-link.active {
    position: relative;
    color: #B80022 !important; /* Можешь поменять цвет под себя */
}

.nav-link.active::after {
    content: '';
    display: block;
    margin: 0 auto;
    width: 60%;
    border-bottom: 2.5px solid #B80022;
    border-radius: 2px;
    position: absolute;
    left: 20%;
    bottom: -4px;
}

