@import url('../null&header&footer.css');

/*----------------------------------MAIN-------------------------------*/
.main {
    margin: 17px 0;
}

.main__row {
    display: flex;
    width: 100%;
    gap: 20px;
}

/*------------------------------main inform (новости)----------------------------*/
.main__inform {
    width: 30%;
    background-color: #e5e5e5;
    padding: 20px;
    margin: 0 0 0 20px;
}

.main__inform-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 11px 0 55px 0;
}

.main__inform-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    border: 1px solid #ccc;
    margin: 15px;
    padding: 10px;
    background-color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.main__inform-body:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transform: scale(1.04);
}

/* Медиа в блоке новости */
.main__inform-image {
    width: 100%;
}

.main__inform-image img,
.main__inform-image video {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    background-color: #000;
}

/* Подписи */
.main__inform-text {
    margin: 20px 0 0 0;
    padding: 5px;
}

.main__inform-text-region,
.main__inform-text-title,
.main__inform-text-date {
    text-align: left;
    font-size: 16px;
    color: #333;
    margin: 5px 0;
}

.main__inform-text-title {
    font-weight: bold;
}

/* Скрытые поля для модалки */
.main__inform-text-text {
    display: none;
    padding: 15px;
}

.main__inform-text-heading {
    display: none;
}

/*----------------------------Модальное окно------------------------------*/
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    display: flex;
    background-color: #fff;
    padding: 20px;
    max-width: 1000px;
    width: 90%;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.modal-content img,
.modal-content video {
    width: 50%;
    height: 500px;
    margin-right: 20px;
    border-radius: 6px;
    object-fit: cover;
    background-color: #000;
}

.modal-text {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    margin: 10px 0;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

.modal-text-content {
    margin: 0 0 40px 0;
}

.modal-text-content p {
    margin: 0 0 0.2em;
    line-height: 1.5;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    overflow-wrap: break-word;
    text-indent: 2em;
}

.modal-region,
.modal-heading,
.modal-date {
    margin: 5px 0 10px 0;
    font-weight: 700;
}

/* Кнопка закрытия */
.modal-close {
    position: absolute;
    top: 10px; right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: red;
}

/*-----------------------------main content (продукция)-----------------------------*/
.main__content {
    width: 70%;
    padding: 20px;
    margin: 0 20px 0 0;
    background-color: #e5e5e5;
}

h1{
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    letter-spacing: 1.5px;
    word-spacing: 1px;
}

.main__content-items{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* Карточка-ссылка серии — как раньше */
.trans-series {
    width: 40%;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 20px 25px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.trans-series:hover {
    transform: scale(1.05); /* Увеличение блока при наведении */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Тень при наведении */
}

.trans-series .main__content-item h3,
.trans-series .main__content-item h4 {
    transition: transform 0.3s ease, font-size 0.3s ease, color 0.3s ease;
}

.trans-series:hover h3,
.trans-series:hover h4 {
    transform: scale(1.1); /* Увеличение текста h3 и h4 */
}

.trans-series:active {
    transform: scale(0.95); /* Эффект вдавливания при нажатии */
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); /* Уменьшение тени при нажатии */
}

/* Изображение — исправленный класс */
.main__content-item-image img{
    width: 100%;
    height: 300px; /* Увеличенная высота для всех картинок */
    object-fit: cover;
}

/* Заголовок серии — исправленный класс */
.main__content-item-series {
    font-size: 18px;
    text-align: center;
    margin: 10px 0;
    color: #000;
    padding: 10px;
    font-weight: 700;
}

h3{
    font-weight: 525;
    font-style: italic;
}

h4{
    font-weight: 700;
}

.main__content-item-detail {
    font-size: 16px;
    margin: 0 auto;
    text-align: center;
    text-transform: uppercase;
    color: #000;
    font-weight: 700;
    letter-spacing: 1.1px;
}

/*-----------Адаптивная вёрстка----------------*/
@media(max-width: 1025px){
    .main__row{
        flex-direction: column;
    }

    .main__inform{
        order: 2;
        width: 90%;
        margin: 0 auto;
    }

    .main__content{
        order: 1;
        width: 90%;
        margin: 0 auto;
    }

    .transformers-image{
        width: 90%;
    }
}

@media(max-width: 983px){
    .main__content-item-series {
        font-size: 16px;
    }
}

@media(max-width: 891px){
    .main__content-item-series {
        font-size: 14px;
    }

    .main__content-item-detail {
        font-size: 14px;
    }
}

@media(max-width: 801px){
    .main__content-item-series {
        font-size: 13px;
    }

    .main__content-item-detail {
        font-size: 13px;
    }
}

@media(max-width: 755px){
    .trans-series {
        width: 45%;
        margin: 20px 5px;
    }
}

@media(max-width: 700px){
    /* Модалка в колонку, контент прокручиваемый */
    .modal-content {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
    }
    .modal-content img,
    .modal-content video {
        width: 100%;
        height: auto;
        margin: 0 0 10px 0;
    }
    .modal-close {
        color: red;
    }
}

@media(max-width: 675px){
    .trans-series {
        width: 90%;
    }

    .main__content-item-image img{
        width: 100%;
        height: auto;
    }

    .main__content-item-series {
        font-size: 18px;
    }

    .main__content-item-detail {
        font-size: 16px;
    }

    .main__inform-text-title {
        font-size: 18px;
    }

    .main__inform-title {
        margin: 7px 0 30px 0;
    }
}

@media(max-width: 480px){
    .trans-series {
        width: 100%;
    }
}
