/* Заголовки */
h1, h2, h3 {
    color: #222;
    padding-bottom: 6px;
    font-weight: 600;
    font-family: 'Poppins',  sans-serif;
}

h1 {
    text-align: center;
    margin-top: 0px;
    margin-bottom: 50px;
    padding-right: 10px;
    font-size: 32px;
}

h2 {
    text-align: left;
    margin-bottom: 20px;
    margin-top: 10px;
    border-bottom: 2px solid rgb(176, 0, 230);
    font-size: 26px;
}

h3 {
    margin-top: 10px;
    margin-bottom: 10px;
    width: fit-content;
    color: black;
    padding-right: 10px;
    font-size: 26px;
}

/* Абзацы */
p {
    font-family: 'Noto Sans', sans-serif;
    margin-right: 20px;
    margin-bottom: 1.2em;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}


/* Горизонтальная линия */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

/* Медиа-блоки */
.media-block {
    padding: 8px;
    width: 100%;
}

.media-block img, 
.media-block video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 4px;
}

.media-block-4-3 img {
    aspect-ratio: 4 / 3;
}

.media-block-small {
    width: 100px;
    float: left;
    margin: 10px 15px 10px 0; /* отступы вокруг картинки */
    object-fit: cover;
}

.float-right {
    float: right;
    margin: 0 0 10px 15px;
    object-fit: cover;
    border-radius: 4px;
}

.size-40 {
    width: 40%;
}

.text-with-image {
    display: flex;
    align-items: center; /* текст выравнивается по верхнему краю картинки */
    gap: 15px; /* отступ между текстом и картинкой */
    padding: 20px 10px 10px 20px;
    margin-bottom: 20px ;
    box-shadow: rgba(0,0,0,0.25) 0px 0px 8px;
}

.text-with-image img {
    width: 40%; /* размер картинки */
    height: auto;
    border-radius: 4px;
    flex-shrink: 0; /* чтобы картинка не сжималась */
}

.text-with-image p {
    font-size: 18px;
    flex: 1; /* текст занимает оставшееся место */
    margin: 0;
}


.highlight-paragraph {
    display: flex;
    align-items: center; /* выравнивание по вертикали */
    justify-content: space-between; /* текст слева, картинка справа */
    padding: 20px; /* отступы от краев контейнера */
    border-radius: 8px;
}

.highlight-paragraph p {
    font-size: 1.5rem; 
    font-weight: 600; 
    margin: 0;
    flex: 1;
}

.place-in-center {
    text-align: center;
}

/* Подписи к медиа */
.media-block-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #474747;
    margin-top: 8px;
    margin-bottom: 0px;
}

/* Списки */
.article-content ul, ol {
    margin-left: 1.5em;
    margin-bottom: 1.2em;
}

.article-content li {
    margin-left: 14px;
    margin-top: 0.6em;
    font-size: 1rem;
    line-height: 1.5;
    list-style-type: disc;
}


/* Ссылки */
.link {
    font-weight: 600;
    color: #007acc;
    text-decoration: none;
    border-bottom: 1px solid #007acc;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.link:hover {
    color: #005999;
    border-bottom-color: #004170;
}

/* Контейнеры для статьи */
.article-content {
    background-color: #fff;
    margin: 60px auto;
    padding: 30px 40px;
    width: 90%;
    max-width: 1200px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}


/* Код для медиа-блоков с видео */
.media-block video {
    border: 1px solid #ccc;
    border-radius: 6px;
}

.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.photo-gallery button {
    flex: 1 1 calc(100% / 6 - 10px); /* по умолчанию 6 фото в ряд, минус gap */
    max-width: calc(100% / 6 - 10px);
}

.photo-gallery button img {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    object-fit: cover
}

.photo-gallery button img:hover {
    transform: scale(1.05); /* лёгкое увеличение при наведении */
}

@media (max-width: 1335px) {
    .text-with-image p {
    font-size: 1.3vw;
}

}

@media (max-width: 1000px) {

    .photo-gallery button {
    flex: 1 1 calc(100% / 3 - 10px); /* по умолчанию 3 фото в ряд, минус gap */
    max-width: calc(100% / 3 - 10px);
}

}

/* Мобильная адаптация */
@media (max-width: 600px) {

    body {
        margin: 0;
        padding: 0;
    }

    .article-content {
        padding: 0 0 20px 0;
        margin: 0;
        width: 100%;
    }

    h3, p {
        margin-left: 14px;
        margin-right: 14px;
    }

    .media-block img {
        padding: 6px;
    }

    h1 {
    padding-left: 14px;
    padding-right: 14px;
    font-size: 26px;
}

h2 {
    font-size: 20px;
    padding-left: 14px;
    padding-right: 14px;
    margin-left: 0;
    margin-right: 0;
}

h3 {
    font-size: 20px;
}

}
