@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');


*,
*::before,
*::after {
    box-sizing: border-box;
}


html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f1f1f1;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 15px 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.logo {
    color: rgba(51, 51, 51, 0.8);
    font-weight: bold;
    font-size: 40px;
    transition: font-size 0.3s ease;
}

.header.scrolled .logo {
    font-size: 30px;
}
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #333;
    font-weight: 500;
}

/* Main */
.main {
    font-family: "Roboto", sans-serif;
    background: #fff;
    flex: 1;
    padding: 100px 16px;
    margin: 0 auto;
    max-width: 1400px;
    width: 100%;
}

/* Grid layout */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

/* News Card */
.news-card {
    background-color: #fff;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image Container */
.image-container {
    height: 230px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    width: 100%;
    height: 100%;
}

/* Card Content */
.card-content {
    padding: 15px 20px 10px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h4 {
    margin: 0 0 10px;
    font-size: 20px;
}

.card-content p {
    margin: 0;
    color: #474747;
    font-size: 14px;
}

/* Footer */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Контейнер */
.container-new {
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-new {
    font-family: "Roboto", sans-serif;
    font-size: 18px;
    line-height: 28px;
    color: #454545;
    width: 60%;
}

.container-new {}

/* Текстовая сетка */
.text-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 10px;
}

.text-grid h4 {
    margin: 2px 2px auto 0px;
}

.text-grid hr {
    border-top: 1px;
}

.date {
    margin: 0;
    font-size: 14px;
    color: #5c5c5c;
    font-style: oblique;
}

.text-card {
    padding-bottom: 5px;
    display: flex;
    flex-direction: column;
    max-height: 200px;
}

.text-card p {
    color: #474747;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-news {
    flex: 6;
}

.text-card .date {

}

.text-card h4 {
    color: #333333;
    flex: 4;
}

.title {
    margin-top: 5px;
    color: #2b2b2b;
}

.between-scene {
    height: 0;
    border: none;
    border-top: 2px solid;
}

hr {
    width: 100%;
}

/* Сетка из маленьких карточек */
.news-card-small .image-container {
    height: 150px;
}

.small-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-card-small h3 {
    margin: 0px 0px 5px 0px;
}
.grid h3{
    margin-bottom: 2px;
    margin-top: 2px;
}
.big-grid p{
    margin-bottom: 4px;
}
.grid p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main {
        padding: 90px 10px;
    }

    .news-grid {
        padding-left: 3px;
    }

    .image-container {
        height: 180px;
    }

    .nav-links {
        gap: 10px;
    }

    .header {
        padding: 10px 12px;
    }

    .news-card {
        flex-direction: column;
        height: auto;
    }

    .card-content {
        padding: 15px;
    }

    .content-new {
        padding-left: 3px;
        width: 100%;
    }

    .text-card {
        height: 150px;
    }

    .news-card-small .image-container {
        height: 120px;
    }

    .small-grid {
        grid-template-columns: repeat(1, 1fr);
    }

}
