@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: 0px 0px 0px 20px;
}

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

.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-body:active {
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.3);
    transform: translateY(7px);
    background: #e0e0e0;
}

/* Картинка и видео на странице */
.main__inform-image {
    width: 100%;
}

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

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

/* Текстовые подписи */
.main__inform-text {
    margin: 20px 0px 0px 0px;
    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;
    font-weight: normal;
    font-style: normal;
}

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

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

.main__inform-text-text p {
    margin: 0px 0px 10px 0px;
}

.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 {
    width: 50%;
    height: 500px;
    margin-right: 20px;
    border-radius: 6px;
    object-fit: fill;
    background-color: #000;
}

.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: bold;
    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-text-content p:last-child {
    margin-bottom: 0;
}

.modal-region,
.modal-name,
.modal-heading,
.modal-date {
    margin: 3px 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%;
    background-color: #e5e5e5;
    padding: 20px;
    margin: 0px 20px 0px 0px;
}

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

.main__content-about-body {
    margin: 30px 0px 0px 0px;
    transition: all 0.9s ease;
}

.main__content-about-image {
    width: 40%;
    float: left;
    margin: 0px 30px 11px 0px;
}

.main__content-about-image img {
    width: 100%;
}

.main__content-about-link {
    color: #0000CD;
}

.main__content-about-text p {
    line-height: 1.6;
    margin-bottom: 1rem;
    hyphens: auto;
    text-align: justify;
    text-justify: inter-word;
    text-indent: 2em;
    font-size: 18px;
}

.about__last-p:last-child {
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
    margin: 30px 0px 10px 0px;
    font-size: 22px;
    letter-spacing: 1.5px;
    font-style: italic;
}

/*--------------------------АДАПТИВНАЯ ВЁРСТКА---------------------------*/
@media(min-width: 1999px){
    .main__inform-title { font-size: 28px; }
    .main__inform-text-title { font-size: 24px; }
    .main__inform-text-region,
    .main__inform-text-date { font-size: 18px; }

    h1 { font-size: 24px; margin-bottom: 35px; }
    .main__content-about-text p { font-size: 22px; }
}

@media(max-width: 1024px){
    .main__inform-title { font-size: 18px; }
    .main__inform-text-title { font-size: 18px; }
    .main__inform-text-region,
    .main__inform-text-date { font-size: 15px; }

    h1 { font-size: 24px; }
    .main__content-about-text p { font-size: 15px; }
}

@media(max-width: 768px){
    .main__row { flex-direction: column; }

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

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

@media(max-width: 480px){
    .main__content-about-body {
        display: flex;
        flex-direction: column;
    }

    h1 { margin: 10px 0px 0px 0px; }

    .main__content-about-image {
        width: 90%;
        margin: 0px auto;
        margin-bottom: 15px;
        float: none;
    }

    .about__last-p:last-child { font-size: 18px; }
}
