/*******************************************************************************
 *                                                                             *
 *   Мост Безопасности // Адаптируемый стиль для первой страницы               *
 *   ----------------------------------------------------------------------    *
 *   Copyright (C) 1998-2018 Studio "Cherry-Design"                            *
 *   URL: http://www.cherry-design.ru/                                         *
 *   E-mail: mike@cherry-design.ru                                             *
 *                                                                             *
 *******************************************************************************/

/* Максимальная ширина
-------------------------------------------------------------------------------*/

@media screen and (min-width: 480px) and (max-width: 980px) {

    .index_slider_inner, .index_video_inner, .index_text_inner, .index_forum_inner {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media screen and (min-width: 981px) {

    .index_slider_inner, .index_video_inner, .index_text_inner, .index_forum_inner {
        width: 980px;
        padding-left: 0;
        padding-right: 0;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Слайдер
-------------------------------------------------------------------------------*/

@media screen and (min-width: 551px) {

    .slide {
        flex-direction: row;
    }
    
    .slide_image {
        width: 180px;
        margin-left: 0;
        margin-right: 30px;
    }
    
    .slide_image a {
        width: 180px;
    }
    
    .slide_text {
        width: calc(100% - 210px);
        flex-grow: 1;
    }
}

/* Видеоролики
-------------------------------------------------------------------------------*/

@media screen and (min-width: 320px) and (max-width: 640px) {

    .index_video_inner ul li {
        width: calc((100% - 20px) / 2);
        margin-right: 20px;
    }

    .index_video_inner ul li:nth-child(2n) {
        margin-right: 0;
    }
}

@media screen and (min-width: 641px) and (max-width: 800px) {

    .index_video_inner ul li {
        width: calc((100% - 40px) / 3);
        margin-right: 20px;
    }

    .index_video_inner ul li:nth-child(3n) {
        margin-right: 0;
    }

    .index_video_inner ul li:nth-child(4) {
        display: none;
    }
}

@media screen and (min-width: 801px) {

    .index_video_inner ul li {
        width: calc((100% - 60px) / 4);
        margin-right: 20px;
    }

    .index_video_inner ul li:nth-child(4n) {
        margin-right: 0;
    }
}

/* Последние сообщения форума (выравнивание и ширины ячеек)
-------------------------------------------------------------------------------*/

@media screen and (max-width: 360px) {

    .index_forum_table th:nth-of-type(1) { width: 100%; }

    .index_forum_table th:nth-of-type(2) { display: none; }
    .index_forum_table td:nth-of-type(2) { display: none; }

    .index_forum_table th:nth-of-type(3) { display: none; }
    .index_forum_table td:nth-of-type(3) { display: none; }

    .index_forum_table th:nth-of-type(4) { display: none; }
    .index_forum_table td:nth-of-type(4) { display: none; }
    
    .index_forum_title_date {
        display: inline;
    }

    .index_forum_title_views {
        display: inline;
    }

    .index_forum_num_messages {
        display: inline;
    }
}

@media screen and (min-width: 361px) and (max-width: 640px) {

    .index_forum_table th:nth-of-type(1) { width: 90%; }
    .index_forum_table th:nth-of-type(2) { width: 10%; }

    .index_forum_table th:nth-of-type(3) { display: none; }
    .index_forum_table td:nth-of-type(3) { display: none; }

    .index_forum_table th:nth-of-type(4) { display: none; }
    .index_forum_table td:nth-of-type(4) { display: none; }
    
    .index_forum_title_date {
        display: inline;
    }

    .index_forum_num_messages {
        display: inline;
    }
}    

@media screen and (min-width: 641px) and (max-width: 800px) {

    .index_forum_table th:nth-of-type(1) { width: 80%; }
    .index_forum_table th:nth-of-type(2) { width: 10%; }
    .index_forum_table th:nth-of-type(3) { width: 10%; }

    .index_forum_table th:nth-of-type(4) { display: none; }
    .index_forum_table td:nth-of-type(4) { display: none; }
    
    .index_forum_title_date {
        display: inline;
    }
}
