* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    color: #555;
height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

nav {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    grid-template-rows: 70px;
    box-shadow:  0 5px 5px rgba(0,0,0,0.15);
    position: sticky;
    background-color: white;
    padding-left: 20px;
    padding-right: 20px;
}

.links {
    justify-self: end;
    display: flex;
    gap: 10px;
}

nav .brand {
    font-size: 28px;
    font-weight:lighter;
    color: #7c7c7b;
}

nav a {
    text-decoration: none;
    display: inline-block;
    padding: 15px 35px;
    transition: background-color 0.3s, color 0.3s;
    color: rgb(88, 88, 88);
    font-size: 18px;
}

nav a:hover,
nav a.active{
    background: #4d9176;
    color: #fff;
    border-radius: 3px;
}

header {
    padding: 40px 20px;
    background-color: #f4f4f4;
}

header .subtitle {
    margin-top: 20px;
    line-height: 28px;
    font-size: 14px;
    font-weight: 300;

}

footer {
    background-color: #333;
    padding: 20px;
    width: 100%;
    color:white;
flex-shrink: 0;

}

footer .footer-content {
    display: flex;
    justify-content: space-between; /* текст слева, счётчик справа */
    align-items: center;
    width: 100%;
}

.counter {
    flex-shrink: 0;
}

.header-banner-row {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    align-items: flex-start;
}

/* Растягиваем header на доступную ширину */
header {
    flex: 1;                 /* занимает оставшееся пространство слева */
    padding: 40px 20px;      /* оставляем ваши отступы */
    background-color: #f4f4f4;
    border-radius: 8px;
}

/* Боковая колонка для баннеров */
.banner-sidebar {
    width: 240px;            /* ширина под баннер */
    flex-shrink: 0;          /* не сжимается */
}

/* Стили карусели */
.banner-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.banner-slide {
    display: none;
    width: 100%;
}

.banner-slide.active {
    display: block;
}

.banner-slide img {
    width: 100%;
    height: auto;
    display: block;
}