/*Шрифты*/

/* cyrillic-ext */
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 400;
    src: local('Roboto Italic'), local('Roboto-Italic'), url(https://fonts.gstatic.com/s/roboto/v20/KFOkCnqEu92Fr1Mu51xFIzIFKw.woff2) format('woff2');
}

/* cyrillic-ext */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');
}

/* cyrillic */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2) format('woff2');
}

/*------------*/

/*Обнуление*/
*{padding:0;margin:0;border:0;}
*,*:before,*:after{box-sizing:border-box;}
:focus,:active{outline:none;}
a:focus,a:active{outline:none;}

nav, footer,header,aside{display:block;}


html,body{
    height:100%;
    width:100%;
    font-size:14px;
    line-height:1;
}

body{
    font-size:16px;
    font-family:'Roboto', sans-serif;
    background-color:#f1f1f1;
    line-height:24px;
}

.wrapper{
    max-width:768px;
    margin:0 auto;
}

header, section, footer{
    background-color:#fff;
}
header{
    max-width:768px;
    margin:0 auto;
    background:#fff;
}

h1{
    font-size:1.5rem;
    font-weight:400;
}

h3{
    padding-top:10px;
    font-size:1rem;
}

hr{
    background-color:#e2e2e2;
    width:100%;
    height:1px;
}

/*--------------------*/

/*Навигация
nav{
    width:100%;
    position:fixed;
    top:0;
    left:0;
    background:#fff;
    z-index:1000;
}

.nav-menu{
    margin:0 auto;
    max-width:800px;
    width:100%;
    height:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 20px;
}

.nav-menu a{
    font-weight:bold;
    color:#666;
}

.nav-menu a:hover{
    color:#878686;
}

.nav-menu a.active-link{
    color:#348ad0;
    text-decoration:underline;
    text-underline-offset:4px;
}

.nav-menu li{
    list-style:none;
}
*/
/*--------------------*/

/*Голова*/
.section-brand{
    margin-top:50px;
    display:flex;
    padding:30px 20px;
}

.brand-logo{
    padding-right:15px;
}

/*-----------*/

/* Блок новостей */

h2 {
    padding: 20px 20px 5px 25px;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 4px 2px 5px #e2e2e2;
}

.news {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
}

/* карточка */
.news-item {
    display: flex;
    border: #e2e2e2 1px solid;
    margin: 20px;
    box-shadow: 0px 0px 30px #e2e2e2;
    padding: 15px;
    gap: 20px;
    align-items: flex-start;
    border-radius: 8px;
    transition: 0.3s;
    justify-content: space-between; /* чтобы кнопка уходила на край */
}

/* hover эффект */
.news-item:hover {
    box-shadow: 0px 5px 30px #d0d0d0;
}

/* шахматка */
.news-item.reverse {
    flex-direction: row-reverse;
}

/* фон через одну */
.news-item:nth-child(even) {
    background-color: #fafafa;
}

/* блок картинки + дата */
.news-pic-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* картинка */
.news-img img {
    width: 150px;
    border-radius: 6px;
    object-fit: cover;
}

/* дата */
.news-date {
    white-space: nowrap;
    display: flex;
    background-color: #1c4e76;
    width: 170px;
    height: 30px;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    color: #fff;
    box-shadow: 0px 0px 5px #b9b9b9;
    font-size: 14px;
}

/* текст */
.news-name {
    font-size: 1.3rem;
    font-weight: bold;
    padding-bottom: 7px;
}

.news-name a {
    text-decoration: none;
    color: #000;
}

.news-text {
    line-height: 150%;
}

/* контейнер текста и кнопки */
.news-name-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

/* кнопка "Подробнее" */
.btn {
    display: inline-block;
    padding: 6px 10px;
    background: #348ad0;
    color: #fff;
    border-radius: 6px;
    margin-top: 10px;
    /* кнопка уходит на противоположную сторону картинки через auto margin */
    margin-left: auto;
}

.news-item.reverse .btn {
    margin-left: 0;
    margin-right: auto;
}

.btn:hover {
    background: #3b99e7;
}

/*Для просмотра будущих новостей */
.future-news {
    opacity: 0.6;
    border-left: 4px solid #ff9800;
}





/* адаптивность для маленьких экранов */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .news-item.reverse {
        flex-direction: column;
    }
    .news-name-text {
        align-items: center;
        text-align: center;
    }
    .btn, .news-item.reverse .btn {
        margin-left: 0;
        margin-right: 0;
    }
    .news-img img {
        width: 100%;
        max-width: 300px;
    }
    .news-date {
        width: auto;
        padding: 0 10px;
    }
}



/*Года*/
.year-section{
    display:flex;
    justify-content:center;
    align-items:center;
    padding-bottom:20px;
}

a.year-link{
    margin:10px;
    display:flex;
    height:30px;
    width:70px;
    background-color:#1c4e76;
    color:#fff;
    justify-content:center;
    align-items:center;
    border-radius:5px;
}

a.year-link:hover{
    background-color:#286ca3;
}

a.year-link-unactive{
    pointer-events:none;
    background-color:#a8a8a8;
}

a.year-link-active{
    background-color:#348ad0;
}

/*--------------*/

/*Footer*/
footer{
    padding-bottom:10px;
}

.footer-block{
    font-size:80%;
	padding:20px;
    display:flex;
    width:100%;
    justify-content:space-between;
    color:#464646;
}

.footer-block a{
    color:#464646;
}

/*----*/

/* адаптив */

@media (max-width:768px){

    .section-brand{
        padding:30px 10px;
    }

    .news-item,
    .news-item.reverse{
        flex-direction:column;
        max-width:500px;
        margin:10px;
    }

    .news-img img{
        width:100%;
        height:auto;
    }

    h2{
        text-align:center;
    }

    .footer-block{
        flex-direction:column;
        text-align:center;
    }

    footer{
        font-size:0.8em;
    }
}

@media (max-width:550px){
    .nav-menu{
        padding:10px;
    }
    .nav-menu li{
        font-size:0.8em;
    }
}

@media (max-width:350px){
    .nav-menu li{
        font-size:0.6em;
    }
    a.year-link{
        margin:5px;
        font-size:14px;
    }
}
