
/*
==================================================
Joomla 5
mod_articles_news

Новости:
- квадратное изображение слева;
- заголовок и текст справа;
- кнопка Подробнее по центру;
- голубая разделительная линия;
- адаптивная верстка.
==================================================
*/


/* ==========================================
   Основной контейнер модуля
   ========================================== */

.newsflash-custom {
    display: flex;
    flex-direction: column;

    width: 100%;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* ==========================================
   Одна новость
   ========================================== */

.newsflash-custom__item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;

    width: 100%;

    gap: 30px;

    margin: 0;
    padding: 30px 0;

    box-sizing: border-box;

    border-bottom: 1px solid #b9d9ed;
}


/* Убираем линию у последней новости */

.newsflash-custom__item:last-child {
    border-bottom: none;
}


/* ==========================================
   Изображение новости
   ========================================== */

.newsflash-custom__image {
    position: relative;

    flex: 0 0 350px;

    width: 350px;
    height: 350px;

    overflow: hidden;

    margin: 0;
    padding: 0;

    background-color: #f3f6f8;

    box-sizing: border-box;
}


/* Ссылка вокруг изображения */

.newsflash-custom__image-link {
    display: block;

    width: 100%;
    height: 100%;

    overflow: hidden;
}


/* Само изображение */

.newsflash-custom__image img {
    display: block;

    width: 100%;
    height: 100%;

    max-width: none;

    object-fit: cover;
    object-position: center center;

    margin: 0;
    padding: 0;

    border: none;

    transition: transform 0.35s ease;
}


/* Эффект при наведении */

.newsflash-custom__image-link:hover img {
    transform: scale(1.04);
}


/* ==========================================
   Контент справа от изображения
   ========================================== */

.newsflash-custom__content {
    display: flex;
    flex-direction: column;

    flex: 1 1 auto;

    min-width: 0;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* ==========================================
   Заголовок новости
   ========================================== */

.newsflash-custom__title {
    display: block;

    margin: 0 0 18px 0;
    padding: 0;

    font-size: 26px;
    font-weight: 600;

    line-height: 1.35;

    color: #0b7ecf;

    overflow-wrap: break-word;
}


/* Ссылка заголовка */

.newsflash-custom__title a {
    color: inherit;

    text-decoration: none;

    transition: color 0.2s ease;
}


/* Заголовок при наведении */

.newsflash-custom__title a:hover {
    color: #1686c9;
}


/* ==========================================
   Вводный текст
   ========================================== */

.newsflash-custom__intro {
    display: block;

    margin: 0;
    padding: 0;

    font-size: 16px;
    font-weight: 400;

    line-height: 1.7;

    color: #fff;

    overflow-wrap: break-word;
}


/* ==========================================
   Контейнер кнопки Подробнее
   ========================================== */

.newsflash-custom__button-wrap {
    display: flex;

    justify-content: center;
    align-items: center;

    width: 100%;

    margin-top: 20px;
    padding: 0;

    box-sizing: border-box;
}


/* ==========================================
   Кнопка Подробнее
   ========================================== */

.newsflash-custom__button {
    position: relative;

    z-index: 2;

    display: inline-flex;

    justify-content: center;
    align-items: center;

    padding: 4px 10px;

    font-size: 16px;
    font-weight: 700;

    color: #021220;

    background: linear-gradient(
        to right,
        #fff,
        #6adffc,
        #20bbf6
    );

    border: none;
    border-radius: 5px;

    cursor: pointer;

    overflow: hidden;

    text-transform: none;
    letter-spacing: 0.5px;

    line-height: 1.5;

    text-decoration: none;

    box-sizing: border-box;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* Состояния ссылки */

.newsflash-custom__button:hover,
.newsflash-custom__button:focus,
.newsflash-custom__button:active {
    color: #021220;

    text-decoration: none;
}


/* Наведение */

.newsflash-custom__button:hover {
    transform: translateY(-2px);

    box-shadow: 0 4px 12px rgba(
        32,
        187,
        246,
        0.3
    );
}


/* Нажатие */

.newsflash-custom__button:active {
    transform: translateY(0);

    box-shadow: none;
}


/* Фокус клавиатуры */

.newsflash-custom__button:focus-visible {
    outline: 2px solid #1686c9;

    outline-offset: 3px;
}


/* ==========================================
   Планшеты
   ========================================== */

@media (max-width: 991px) {

    .newsflash-custom__item {
        gap: 24px;

        padding: 24px 0;
    }


    .newsflash-custom__image {
        flex: 0 0 280px;

        width: 280px;
        height: 280px;
    }


    .newsflash-custom__title {
        font-size: 22px;

        margin-bottom: 14px;
    }


    .newsflash-custom__intro {
        font-size: 15px;

        line-height: 1.6;
    }


    .newsflash-custom__button-wrap {
        margin-top: 16px;
    }

}


/* ==========================================
   Мобильные устройства
   ========================================== */

@media (max-width: 767px) {

    .newsflash-custom__item {
        flex-direction: column;

        gap: 18px;

        padding: 20px 0;
    }


    .newsflash-custom__image {
        flex: 0 0 auto;

        width: 100%;
        height: auto;

        aspect-ratio: 1 / 1;
    }


    .newsflash-custom__content {
        width: 100%;
    }


    .newsflash-custom__title {
        font-size: 21px;

        line-height: 1.4;

        margin-bottom: 12px;
    }


    .newsflash-custom__intro {
        font-size: 15px;

        line-height: 1.65;
    }


    .newsflash-custom__button-wrap {
        margin-top: 18px;
    }

}


/* ==========================================
   Небольшие смартфоны
   ========================================== */

@media (max-width: 480px) {

    .newsflash-custom__item {
        padding: 16px 0;

        gap: 14px;
    }


    .newsflash-custom__title {
        font-size: 19px;

        line-height: 1.4;

        margin-bottom: 10px;
    }


    .newsflash-custom__intro {
        font-size: 14px;

        line-height: 1.6;
    }


    .newsflash-custom__button-wrap {
        margin-top: 16px;
    }


    .newsflash-custom__button {
        font-size: 16px;

        padding: 4px 10px;
    }

}
