/**
 * SMM Home — компактніший ритм головної та стиль, узгоджений зі сторінкою лабораторій.
 * Усе скоупиться на body.home, щоб не зачепити інші сторінки.
 */

/* ---------- Вертикальний ритм ---------- */

body.home .front-page {
    padding-top: 44px;
}

body.home .news,
body.home .announcements-wrapper,
body.home .events {
    margin-bottom: 40px;
}

body.home .gallery {
    padding-top: 8px;
    margin-bottom: 24px;
}

body.home .show-more-wrapper {
    margin-top: 6px;
    padding: 0 16px;
}

body.home .promo-video {
    max-width: 1180px;
    margin: 8px auto 36px;
    padding: 32px 24px;
    border-radius: 22px;
    background: linear-gradient(160deg, #f4f8f4 0%, #ecf3ec 100%);
    border: 1px solid rgba(15, 41, 18, 0.08);
}

body.home .promo-video__wrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 36px -28px rgba(15, 41, 18, 0.65);
}

body.home .promo-video__title {
    margin: 0 0 12px;
    font-size: clamp(22px, 2.3vw, 30px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #25603c;
}

/* ---------- Картки новин ---------- */

body.home .news__item {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    border: 1px solid rgba(15, 41, 18, 0.12);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.home .news__item:hover,
body.home .news__item:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(37, 96, 60, 0.35);
    box-shadow: 0 18px 34px -26px rgba(15, 41, 18, 0.6);
}

body.home .news__item > div {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 16px 16px;
}

body.home .news__item-img {
    margin: 0 -16px 14px;
    border-radius: 0;
}

body.home .news__item-title {
    font-size: 16px;
    line-height: 1.35;
    margin: 0 0 8px;
    color: #16241b;
}

body.home .news__item-date {
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5f6f66;
    margin-bottom: 8px;
}

body.home .news__item-short-story {
    font-size: 14px;
    line-height: 1.6;
    color: #5f6f66;
    margin: 0;
}

/* ---------- Кнопки «більше» ---------- */

body.home .show-more-wrapper .button,
body.home .events__show-more .button {
    padding: 9px 22px;
    font-size: 12px;
    letter-spacing: 0.06em;
    border-radius: 999px;
}

/* ---------- Галерея ---------- */

body.home .gallery__img-wrap {
    border-radius: 12px;
    overflow: hidden;
}

body.home .gallery .swiper-slide {
    padding: 0 5px;
}

/* ---------- Партнери: без дублів, компактна стрічка ---------- */

body.home .partners {
    padding: 10px 0 28px;
}

body.home .partners .site-swiper-navigation {
    display: none;
}

body.home .partners__swiper {
    overflow: hidden;
}

body.home .partners__swiper .swiper-wrapper {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 72px;
    width: 100% !important;
    transform: none !important;
    transition: none !important;
}

/* Swiper у режимі loop дублює слайди — прибираємо клони */
body.home .partners__swiper .swiper-slide-duplicate {
    display: none !important;
}

body.home .partners__item {
    width: auto !important;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
}

body.home .partners__img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    width: auto;
    padding: 0;
}

body.home .partners__img-wrap img {
    height: 46px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    filter: saturate(0.9);
    opacity: 0.9;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

body.home .partners__img-wrap:hover img {
    filter: none;
    opacity: 1;
}

@media (max-width: 767px) {
    body.home .promo-video {
        padding: 20px 16px;
        border-radius: 18px;
    }

    body.home .partners__swiper .swiper-wrapper {
        gap: 40px;
    }

    body.home .partners__img-wrap,
    body.home .partners__img-wrap img {
        height: 36px;
    }
}

/* ---------- Події: компактні картки ---------- */

body.home .events__slide {
    padding-top: 0 !important;
    height: 100%;
}

body.home .events__slide > a {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    padding: 16px 16px 18px;
    border: 1px solid rgba(15, 41, 18, 0.12);
    border-radius: 16px;
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.home .events__slide > a:hover,
body.home .events__slide > a:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(37, 96, 60, 0.35);
    box-shadow: 0 18px 34px -26px rgba(15, 41, 18, 0.55);
}

body.home .events__slide-date {
    display: inline-flex;
    flex-direction: column;
    align-self: flex-start;
    gap: 2px;
    padding: 7px 11px;
    border-radius: 10px;
    background: #25603c;
    color: #fff;
    font-size: 11.5px;
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-transform: none;
}

body.home .events__slide-date span:first-child {
    font-weight: 700;
}

body.home .events__slide-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    color: #16241b;
}

body.home .events__slide-place {
    margin: 0;
    margin-top: auto;
    font-size: 12px;
    color: #5f6f66 !important;
}

body.home .events__show-more {
    margin-top: 18px;
}

/* ---------- Партнери ---------- */

.smm-partners {
    margin: 8px 0 0;
    padding: 22px 24px 30px;
    border-top: 1px solid rgba(15, 41, 18, 0.1);
}

.smm-partners__inner {
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
}

.smm-partners__title {
    margin: 0 0 18px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #5f6f66;
}

.smm-partners__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 56px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.smm-partners__item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.smm-partners__item img {
    height: 46px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: saturate(0.9);
    opacity: 0.9;
    transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.smm-partners__item a:hover img {
    filter: none;
    opacity: 1;
    transform: translateY(-2px);
}

/* ---------- Відео ---------- */

.smm-video {
    max-width: 1180px;
    margin: 8px auto 32px;
    padding: 26px 24px 28px;
    border: 1px solid rgba(15, 41, 18, 0.08);
    border-radius: 22px;
    background: linear-gradient(160deg, #f4f8f4 0%, #ecf3ec 100%);
}

.smm-video__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.smm-video__title-main {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #25603c;
}

.smm-video__channel {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #25603c;
    border-bottom: 1px solid rgba(37, 96, 60, 0.35);
    padding-bottom: 2px;
}

.smm-video__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.smm-video__item {
    margin: 0;
    list-style: none;
}

.smm-video__link {
    display: flex;
    flex-direction: column;
    gap: 9px;
    color: #16241b;
}

.smm-video__thumb {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #d8e3da;
}

.smm-video__thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.smm-video__link:hover .smm-video__thumb img {
    transform: scale(1.04);
}

.smm-video__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    border-radius: 50%;
    background: rgba(15, 41, 18, 0.72);
    box-shadow: 0 6px 18px rgba(15, 41, 18, 0.35);
}

.smm-video__play::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 12px;
    border-style: solid;
    border-width: 9px 0 9px 14px;
    border-color: transparent transparent transparent #fff;
}

.smm-video__title {
    font-size: 13px;
    line-height: 1.4;
    color: #2f3f35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Заголовок фотогалереї ---------- */

.smm-gallery-title {
    margin: 8px 0 14px;
    padding: 0 16px;
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #25603c;
}

@media (max-width: 900px) {
    .smm-video__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .smm-video {
        border-radius: 18px;
        padding: 20px 16px 22px;
    }

    .smm-partners__list {
        gap: 32px;
    }

    .smm-partners__item img {
        height: 38px;
    }
}

/* =========================================================
   Уніфіковані стрічки: Події / Оголошення / Життя кафедри
   ========================================================= */

.smm-sec {
    margin: 0 0 38px;
}

.smm-sec__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.smm-sec__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.smm-sec__title {
    margin: 0;
    font-size: clamp(22px, 2.3vw, 28px);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #25603c;
}

.smm-sec__all {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #25603c;
    border-bottom: 1px solid rgba(37, 96, 60, 0.35);
    padding-bottom: 2px;
    white-space: nowrap;
}

.smm-sec__all:hover {
    color: #16241b;
    border-color: rgba(22, 36, 27, 0.4);
}

.smm-rail {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding: 4px 0 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.smm-rail::-webkit-scrollbar {
    display: none;
}

.smm-rail:focus-visible {
    outline: 2px solid rgba(71, 143, 41, 0.55);
    outline-offset: 4px;
    border-radius: 12px;
}

/* картки */

.smm-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
    display: flex;
    border: 1px solid rgba(15, 41, 18, 0.12);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.smm-card:hover,
.smm-card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(37, 96, 60, 0.35);
    box-shadow: 0 18px 34px -26px rgba(15, 41, 18, 0.55);
}

.smm-card__link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 18px;
    color: #16241b;
}

.smm-card__title {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.4;
    font-weight: 600;
    color: #16241b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smm-card__place {
    margin-top: auto;
    font-size: 12.5px;
    color: #5f6f66;
}

.smm-card__place::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border: 1.5px solid #478f29;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    vertical-align: 1px;
}

/* подія */

.smm-card--event .smm-card__link {
    gap: 12px;
}

.smm-event__date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 10px;
    background: #25603c;
    color: #fff;
}

.smm-event__date b {
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}

.smm-event__date span {
    font-size: 11.5px;
    line-height: 1.2;
    opacity: 0.92;
}

.smm-event__date em {
    font-size: 11.5px;
    font-style: normal;
    font-weight: 700;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
}

/* оголошення */

.smm-card--note {
    flex-basis: 340px;
}

.smm-card--note .smm-card__link {
    gap: 8px;
}

.smm-note__badge {
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef4ee;
    color: #25603c;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.smm-card--note .smm-card__title {
    -webkit-line-clamp: 2;
}

.smm-card__excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #5f6f66;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smm-card__more {
    margin-top: auto;
    padding-top: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #478f29;
}

/* фото */

.smm-photo {
    flex: 0 0 280px;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #e7efe8;
    scroll-snap-align: start;
}

.smm-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.smm-photo:hover img {
    transform: scale(1.04);
}

@media (max-width: 620px) {
    .smm-sec__inner {
        padding: 0 16px;
    }

    .smm-card {
        flex-basis: 260px;
    }

    .smm-card--note {
        flex-basis: 300px;
    }

    .smm-photo {
        flex-basis: 220px;
    }
}

/* ---------- Стрічка: обгортка та кнопки прокрутки ---------- */

.smm-rail-wrap {
    position: relative;
}

.smm-rail {
    scroll-behavior: smooth;
}

.smm-rail__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px;
    border: 1px solid rgba(15, 41, 18, 0.12);
    border-radius: 50%;
    background: #fff;
    color: #25603c;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px -14px rgba(15, 41, 18, 0.6);
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.smm-rail__nav:hover {
    background: #25603c;
    color: #fff;
}

.smm-rail__nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.smm-rail__nav_prev {
    left: -18px;
}

.smm-rail__nav_next {
    right: -18px;
}

.smm-rail-wrap:not(.is-scrollable) .smm-rail__nav {
    display: none;
}

/* ---------- Оголошення: мета внизу картки ---------- */

.smm-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 6px;
}

.smm-note__label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9aa8a0;
}

/* ---------- Новини: однакові плитки ---------- */

body.home .news__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 0 0 18px;
    align-items: stretch;
}

body.home .news__item {
    height: 100%;
}

body.home .news__item-img {
    position: relative;
    height: 0 !important;
    padding: 0 0 62.5% 0 !important;
    margin: 0 -16px 14px;
    overflow: hidden;
}

body.home .news__item-img img {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.home .news__item-title {
    font-size: 19px;
    line-height: 1.35;
}

/* ---------- Футер: компактніше + партнери ---------- */

.footer__content {
    padding: 26px 0 18px;
}

.footer-menu {
    padding-left: 20px;
    margin: 0;
}

.footer-menu a {
    font-size: 13px;
    line-height: 1.85;
}

.footer-logo {
    max-width: 96px;
    height: 96px;
}

.footer-address {
    font-size: 12.5px;
    padding: 12px 0 4px;
}

.site-info {
    font-size: 11.5px;
    padding: 6px 0 16px;
}

.smm-footer-partners {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 0 0 18px;
    margin: 0 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.smm-footer-partners__label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.smm-footer-partners__list {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.smm-footer-partners__list li {
    margin: 0;
    list-style: none;
}

.smm-footer-partners__list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 7px 14px;
    border-radius: 10px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smm-footer-partners__list a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -12px rgba(0, 0, 0, 0.6);
}

.smm-footer-partners__list img {
    height: 26px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

/* Компактний футер — перекриваємо медіа-правила теми */
body .footer__content {
    padding: 22px 0 12px !important;
}

body .footer-menu a {
    font-size: 13px !important;
    line-height: 1.8 !important;
}

body .footer-logo {
    max-width: 84px !important;
    height: 84px !important;
}

body .footer-address {
    font-size: 12.5px !important;
    margin-bottom: 10px !important;
    padding: 8px 0 0 !important;
}

body .site-info {
    padding: 9px 0 !important;
    font-size: 11px !important;
}

@media (max-width: 767px) {
    .smm-rail__nav_prev {
        left: -8px;
    }

    .smm-rail__nav_next {
        right: -8px;
    }

    body.home .news__list {
        grid-template-columns: 1fr;
    }

    .smm-footer-partners {
        gap: 12px;
    }

    .smm-footer-partners__list {
        gap: 22px;
    }

    .smm-footer-partners__list img {
        height: 24px;
    }
}

/* ---------- Виправлення: тема малює вертикальну лінію та робить flex-колонку ---------- */

.announcements-wrapper::before {
    display: none !important;
    content: none !important;
}

body.home .announcements-wrapper {
    display: block;
}

body.home .smm-sec,
body.home .smm-sec__inner,
body.home .smm-rail-wrap {
    width: 100%;
    max-width: 100%;
}

body.home .smm-rail {
    scroll-padding-left: 0;
}

/* ---------- Новини: картки на всю ширину колонки ---------- */

body.home .news-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    -ms-flex: 0 0 100% !important;
    flex: 0 0 100% !important;
}

body.home .news,
body.home .news__list,
body.home .news__item {
    width: 100%;
    max-width: 100%;
}

body.home .news__list {
    justify-items: stretch;
}

/* ---------- Однакова ширина карток у всіх стрічках ---------- */

.smm-card,
.smm-card--note {
    flex: 0 0 340px;
}

.smm-photo {
    flex: 0 0 340px;
}

@media (max-width: 620px) {
    .smm-card,
    .smm-card--note,
    .smm-photo {
        flex-basis: 280px;
    }
}

/* Тема зсуває зображення новини на -30px — у картці це дає порожнечу */
body.home .news__item-img {
    top: 0 !important;
}

/* ---------- Футер: фінальне ущільнення ---------- */

body .footer__content {
    padding: 12px 0 0 !important;
}

.smm-footer-partners {
    padding: 0 0 10px !important;
    margin: 0 0 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.smm-footer-partners__list a {
    height: 38px !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
}

.smm-footer-partners__list img {
    height: 22px !important;
    max-width: 108px !important;
}

body .footer-menu {
    margin: 0 !important;
    padding-left: 16px !important;
}

body .footer-menu li {
    margin: 0 !important;
}

body .footer-menu a {
    font-size: 12.5px !important;
    line-height: 1.55 !important;
}

body .footer-1 > div[style],
body .footer-2 > div[style] {
    margin-bottom: 4px !important;
    font-size: 12.5px;
}

body .footer-logo {
    max-width: 64px !important;
    height: 64px !important;
    padding: 2px 4px 4px !important;
}

body .footer-address {
    font-size: 12px !important;
    margin: 10px 0 6px !important;
    padding: 0 !important;
}

body .site-info {
    padding: 7px 0 10px !important;
    font-size: 10.5px !important;
}
