@import url("fonts.css");

/* styles-dynamic.css - Стили для динамических страниц */

.content-separator {
    height: 2px;
    background: linear-gradient(90deg, #fdcd00, #cc3300, #fdcd00);
    margin: 5px 0 5px 0;
    border: none;
}

.article-layout {
    background-color: #fefcef;
    padding: 0px 0;
}
/*/*
.article-layout .wrap {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
*/
.main-image-wrapper {
    margin-bottom: 2px;
}

/* Базовые стили - вертикальная компоновка по умолчанию (мобильная first) */
.article-layout .wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/*/*
.post-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
*/
.content-column {
    width: 100%;
}

/* Горизонтальная компоновка начиная с 480px */
@media (min-width: 480px) {
    .article-layout .wrap {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .post-column {
        flex: 0 0 200px; /* Фиксированная ширина 300px */
        width: 200px;
    }
	#container .post-column .element .top .social {
        left: 68px; /* Фиксированная ширина 300px */
        
    }
    
    .content-column {
        flex: 1; /* Занимает всё оставшееся пространство */
        min-width: 0; /* Важно для правильного сжатия */
    }
	.post-column .element .top .social {
    display: block;
    position: absolute;
    left: 120px; /* ← ОСНОВНОЕ ЗНАЧЕНИЕ */
    top: 8px;
    z-index: 10;
}
}

/* Новое правило для узких экранов (767px и меньше) */
@media (max-width: 767px) {
    #container .post-column .element .top .social {
        left: 10px; /* Для мобильных - сдвигаем левее */
    }
    
    /* Дополнительно можно сделать компактнее */
    .post-column .element .top .social p {
        padding: 2px 8px;
        min-width: 160px;
    }
}

/* Опционально: адаптация gap для разных экранов */
@media (min-width: 768px) {
    .article-layout .wrap {
        gap: 15px;
    }
	.post-column {
        flex: 0 0 300px; /* Фиксированная ширина 300px */
        width: 300px;
    }
		
}

@media (max-width: 767px) {
    .post-column .element .top .social {
        left: 20px;
        right: auto;
    }
    
    /* Используем flex с gap для равных отступов */
    .post-column .element .top .social p {
        display: flex;
        align-items: center;
        gap: 4px; /* Фиксированное расстояние между всеми элементами */
        padding: 2px 8px;
    }
    
    /* Убираем margin-right, используем только gap */
    .post-column .element .top .social p > * {
        margin-right: 0 !important;
    }
    
    /* Компактные иконки */
    .post-column .element .top .social .edit,
    .post-column .element .top .social .favorites,
    .post-column .element .top .social .like,
    .post-column .element .top .social .comments {
        padding-left: 10px;
        background-size: 18px 18px;
        min-height: 16px;
    }
}



@media (min-width: 1200px) {
    .article-layout .wrap {
        gap: 20px;
    }
}
/*
.post-column {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
*/
.post-column .element {
    background-color: #f9f9f9;
    border: 1px solid #bfbfbf;
    border-radius: 10px 10px 10px 10px;
    box-shadow: 0 0 3px #dadada;
    width: 100%;
    margin-bottom: 5px;
	
}
/*
.content-column {
    flex: 1;
    min-width: 0;
}
*/
.content-column .main_article {
    margin-top: 0;
}

/* СОЦИАЛЬНЫЕ ИКОНКИ */
.post-column .element .top .social {
    display: block;
    position: absolute;
    left: 167px;
    top: 8px;
    z-index: 10;
}

.post-column .element .top:before {
    content: "";
    background-color: rgba(0, 0, 0, 0.0);
    position: absolute;
    height: 40px;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 10;
}

#container .post-column .element .top .social p {
    color: white;
    display: inline-block;
    padding: 1px 10px;
    margin: 0;
    font-size: 120%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}
#container .post-column .element .top .social .edit {
    background: url("../images/edit25.png") no-repeat left center;
    padding-top: 0px;
    padding-left: 25px;
	
	display: inline-block; /* Важно! */
    min-height: 20px; /* Высота как у других иконок */
    margin-right: 8px; /* Отступ перед следующей иконкой */
    cursor: pointer;
   
    text-decoration: none; /* Убираем подчеркивание */
    color: transparent; /* Делаем текст невидимым */
    overflow: hidden; /* Скрываем лишнее */
}


/* Для остальных иконок добавьте margin-left, чтобы не прилипали */
#container .post-column .element .top .social .favorites {
    margin-left: 0; /* У первой иконки после edit нет отступа */
}

/* Для related posts тоже добавьте стили */
.related-posts-grid .element .top .social .edit {
    background: url("../images/edit25.png") no-repeat left center;
    padding-left: 25px;
    padding-top: 0px;
    display: inline-block;
    min-height: 20px;
    margin-right: 8px;
    cursor: pointer;
	
}



#container .post-column .element .top .social .favorites {
    background: url("../images/bookmark24.png") no-repeat left center;
    padding-top: 5px;
    padding-left: 25px;
}

#container .post-column .element .top .social .like {
    background: url("../images/heart22.png") no-repeat left center;
    padding-left: 25px;
    padding-top: 2px;
}

#container .post-column .element .top .social .comments {
    background: url("../images/comm3.png") no-repeat left center;
    padding-top: 5px;
    padding-left: 25px;
}

.element .bottom .date {
    color: #b0afae;
    font-size: 80%;
    margin: 8px 0;
    padding-left: 10px;
}

/* ЗАГОЛОВОК СТАТЬИ */
.main_article .element_article h1 {
    font-family: "story", Arial, Tahoma, sans-serif;
    font-size: 22px;
    color: #cc3300;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: normal;
    text-align: center;
    border-bottom: 2px solid #fdcd00;
    padding-bottom: 15px;
}

/* КОНТЕНТ СТАТЬИ */
.dynamic-content {
    font-size: 14px;
    line-height: 1.4;
}

.dynamic-content p {
    margin-bottom: 14px;
    /*text-align: justify;*/
}
.dynamic-content a{  
	color: #000; 
	text-decoration:none; 	
}
.dynamic-content a:hover{
	color: #cc3300; 
}
.main_article .element_article ul {
    list-style: none; /* Убираем стандартные маркеры */
    padding-left: 20px; /* Отступ для маркеров */
}

.main_article .element_article ul li {
    position: relative;
    padding-left: 15px; /* Отступ для текста от маркера */
    margin-bottom: 8px;
}

.main_article .element_article ul li::before {
    content: "•"; /* или любой символ (✓, →, ✦ и т.д.) */
    color: #cc3300; /* цвет */
    font-size: 1.2em;
    position: absolute;
    left: 0; /* Выравниваем по левому краю элемента li */
    top: 0;
}

/* ГАЛЕРЕЯ В ЛЕВОЙ КОЛОНКЕ */
.post-column .content-gallery {
    background: white;
    padding: 10px;
    margin: 0px;
    border-radius: 8px;
    border: 1px solid #bfbfbf;
    box-shadow: 0 0 3px #dadada;
}

.post-column .content-gallery h3 {
    ont-family: "story", Arial, Tahoma, sans-serif;
    color: #cc3300;
    margin-bottom: 0px;
    font-size: 18pfx;
    font-weight: normal;
   /* text-align: center;*/
    border-bottom: 2px solid #fdcd00;
    padding-bottom: 2px;
}

/* Стили для галереи - 4 КВАДРАТА В РЯД */
.gallery-items-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
    position: relative;
}

.gallery-preview-item {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Это создает квадрат */
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
    transition: transform 0.3s;
    border: 1px solid #bfbfbf;
    position: relative;
}

.gallery-preview-item:hover {
    transform: scale(1.05);
}

.gallery-preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    text-align: center;
    background: #f8f9fa;
    padding: 10px;
    box-sizing: border-box;
}

.video-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

/* Стили для блока "Еще" в галерее */
.gallery-more {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Квадрат */
    border: 2px  #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.gallery-more:hover {
    border-color: #3498db;
    transform: scale(1.05);
}

.gallery-more:hover .more-count {
    color: #fdcd00;
}

.more-count {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.missing-file {
    color: #ff4444;
    font-size: 10px;
    margin-top: 5px;
}

.file-info {
    font-size: 10px;
    color: #fff;
    margin-top: 2px;
    word-break: break-all;
}

.missing-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #666;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Модальное окно галереи * после изменения padding 0 c 20ти размер фото увеличился до краев*/
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0px;
    box-sizing: border-box;
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    border-radius: 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    width: auto;
    height: auto;
}

.gallery-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 30px;
    cursor: pointer;
    color: white;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.gallery-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 0;
}

.gallery-slide img,
.gallery-slide video {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 8px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 15px 0 0 0;
    padding: 0px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.gallery-prev,
.gallery-next {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.gallery-counter {
    font-weight: bold;
    color: white;
    min-width: 60px;
    text-align: center;
    font-size: 16px;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    max-height: 100px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-top: 15px;
}

.gallery-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border: 2px solid transparent;
}

.gallery-thumbnail.active {
    opacity: 1;
    border: 2px solid #fdcd00;
}

.gallery-thumbnail:hover {
    opacity: 0.8;
}

.gallery-thumbnail img,
.gallery-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail {
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    text-align: center;
    padding: 0px;
}

.error-message {
    color: #ff4444;
    text-align: center;
    padding: 20px;
    background: #fff5f5;
    border-radius: 8px;
    margin: 10px 0;
}
/* Стили для блока карты */
.content-map {
    background: #fff;
    border-radius: 10px;
    padding: 5px;
    margin-top: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.content-map h3 {
    font-family: "story", Arial, Tahoma, sans-serif;
    color: #cc3300;
    margin-bottom: 0px;
    font-size: 12px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 2px;
}
/* Контейнер для Яндекс карты */
#map-container {
    width: 100%;
    height: 400px;
    margin-top: 5px;
    border-radius: 8px;
    overflow: hidden;
}
/* Адаптивность для карты */

@media (max-width: 768px) {
    .content-map {
        margin: 0;
        padding: 5px;
    }
    
    #map-container {
        height: 300px;
    }
    
    .content-map h3 {
        font-size: 12px;
		
    }
}






/* Стили для блока комментариев */
.content-comments {
    
	background: #fff;
    border-radius: 5px;
    padding: 10;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.content-comments h3 {
    font-family: "story", Arial, Tahoma, sans-serif;
    color: #cc3300;
    margin-bottom: 0px;
    font-size: 18px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 2px;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
}
.dialog-border {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3498db;
    border-radius: 3px 0 0 3px;
    
}
.comment-item {
    position: relative;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 2px;
    margin-bottom: 2px;
}
/* Основной бордер ветки */
.comment-thread {
    border-left: 1px solid #3498db;
    padding-left: 1px;
    margin-bottom: 3px;
    border-radius: 8px 0 0 8px;
}

/* Стрелка ответа */
.reply-arrow {
    color: #7f8c8d;
    margin: 0 2px;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
	
}

.comment-author {
    font-size: 12px;
	color: #2c3e50;
    font-weight: 600;
}

.comment-date {
    color: #7f8c8d;
    font-size: 12px;
}


.no-comments {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0px;
	margin-top: 10px;
    text-align: center;
}

/* Адаптивность для комментариев */
@media (max-width: 768px) {
    .content-comments {
        margin: 0;
        padding: 10px;
    }
    
    
}





/* КОММЕНТАРИИ В ПРАВОЙ КОЛОНКЕ */
.content-column .article-comments {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 5px;
    margin-top: 5px;
}

.content-column .article-comments h2 {
    font-family: "story", Arial, Tahoma, sans-serif;
    color: #cc3300;
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: normal;
    border-bottom: 2px solid #fdcd00;
    padding-bottom: 10px;
}

.content-column .comment-form textarea {
    width: 100%;
    padding: 0px;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-height: 100px;
    margin-bottom: 15px;
    font-size: 14px;
    resize: vertical;
    font-family: Arial, Tahoma, sans-serif;
    background: #fafafa;
}

.content-column .comment-form button {
    background: #3498db;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
    display: block;
    margin: 0 auto;
    width: 100%;
}

.content-column .comment-form button:hover {
    background: #2980b9;
}

/* СВЯЗАННЫЕ ПОСТЫ */
.related-posts {
    margin: 10px 0 0 0;
    padding: 5px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #bfbfbf;
}

.related-posts h3 {
    color: #cc3300;
    border-bottom: 2px solid #fdcd00;
    padding-bottom: 10px;
    font-family: 'story', Arial, sans-serif;
}
/*
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 5px;
    margin-top: 15px;
    align-items: stretch; /* Важно для выравнивания высоты */
}
/*
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px; /* было 20px */
}

/* Дополнительные настройки для разных экранов */
@media (max-width: 1200px) {
    .related-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 9px; /* было 18px */
    }
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 8px; /* было 16px */
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 7px; /* было 14px */
    }
}
.related-posts-grid .element {
    background-color: #f9f9f9;
    border: 1px solid #bfbfbf;
    border-radius: 10px 10px 10px 10px;
    box-shadow: 0 0 3px #dadada;
    margin: 5px 0;
    position: relative;
    overflow: hidden;
    display: flex;	
    flex-direction: column;
    height: 100%;
	
}

.related-posts-grid .element .top {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.related-posts-grid .element .top:before {
    content: "";
    background-color: rgba(0, 0, 0, 0.2);
    position: absolute;
    height: 40px;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 1;
}

.related-posts-grid .element .top .social {
    display: block;
    position: absolute;
    right: 10px;
    top: 8px;
    z-index: 10;
}

.related-posts-grid .element .top .social p {
    color: white;
    display: inline-block;
    padding: 0px 0px;
    margin: 0;
    font-size: 120%;
    border-radius: 15px;
	background: rgba(0, 0, 0, 0.2);
}

.related-posts-grid .element .top .social .favorites {
    background: url("../images/bookmark24.png") no-repeat left center;
    padding-top: 5px;
    padding-left: 25px;
    cursor: pointer;
}

.related-posts-grid .element .top .social .like {
    background: url("../images/heart22.png") no-repeat left center;
    padding-left: 25px;
    padding-top: 2px;
    cursor: pointer;
}

.related-posts-grid .element .top .social .comments {
    background: url("../images/comm3.png") no-repeat left center;
    padding-top: 3px;
    padding-left: 25px;
    cursor: pointer;
}

.related-posts-grid .element .bottom {
    padding: 10px;
    border-radius: 8px;
    border-left: 2px solid #fdcd00;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-posts-grid .element .bottom .related-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0px;
}

.related-posts-grid .element .bottom .related-post-link strong {
    color: #cf3400;
    font-family: story;
    font-size: 130%;
    text-decoration: none;
    font-weight: normal;
    display: block;
    margin-bottom: 8px;
}

.related-posts-grid .element .bottom .related-post-link small {
    color: #b0afae;
    font-size: 80%;
    display: block;
}

.related-posts-grid .element .bottom .related-post-link:hover {
    text-decoration: none;
}

.related-posts-grid .element .bottom .related-post-link:hover strong {
    color: #cf3400;
    text-decoration: underline;
}

/* Стили для текстового описания в связанных постах */
/* Стили для текстового описания в связанных постах */
.related-post-description {
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    border-radius: 4px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.related-post-description p {
    font-size: 14px;
    line-height: 1.4;
    color: #000;
    margin: 0 0 0 0;
    padding: 0px;
    /* УБИРАЕМ эти свойства: */
    /* display: -webkit-box; */
    /* -webkit-line-clamp: 3; */
    /* -webkit-box-orient: vertical; */
    overflow: hidden; /* оставляем на всякий случай */
    min-height: 55px;
    font-family: Arial, sans-serif;
    font-weight: normal;
    background: #f8f9fa;
    border-radius: 4px;
}

.related-posts-grid .element .bottom small {
    color: #b0afae;
    font-size: 80%;
    margin-top: auto;
    padding: 0 5px;
}

/* Стили для динамических лайков */
.dynamic-like {
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dynamic-like::before {
    content: '❤️';
    font-size: 18px;
}

.dynamic-like:hover:not(.already-liked) {
    transform: scale(1.1);
}

.dynamic-like.dynamic-liked {
    animation: dynamic-like-pulse 0.6s ease;
}

.dynamic-like.already-liked {
    cursor: not-allowed !important;
    opacity: 1 !important;
    transform: none !important;
}

.dynamic-like.already-liked::before {
    content: '💖';
    font-size: 18px;
}

.dynamic-like.already-liked:hover {
    transform: none !important;
}

@keyframes dynamic-like-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Дополнительные стили 
.comment-header {
    font-size: 16px;
    color: #cf3400;
    text-decoration: underline;
    font-family: 'story', Arial, sans-serif;
}

.comment-text {
    font-size: 14px;
    color: #3498db;
    line-height: 1.4;
    
    font-family: Noteworthy Arial, sans-serif;
}



/* Адаптивность */
@media (max-width: 768px) {
    .related-posts-grid .element .top .social {
        right: 5px;
        top: 5px;
    }
    
    .related-posts-grid .element .top .social p {
        font-size: 110%;
        padding: 0px 8px;
    }
    
    .related-posts-grid .element .bottom {
        padding: 8px;
    }
    
    .related-posts-grid .element .bottom .related-post-link strong {
        font-size: 120%;
    }
    
    .related-post-description p {
        font-size: 14px;
        min-height: 0px;
       /* -webkit-line-clamp: 2;*/
        padding: 0px;
    }
}

/* Мобильная адаптация - блоки становятся вертикально  ЭТО ЗНАЧЕНИЕ 350 - 650 НУЖНО БУДЕТ ПОДСТРОИТЬ ПОД МОБИЛКИ*/
@media (max-width: 350px) {
    .article-layout .wrap {
        flex-direction: column;
        gap: 5px;
    }
    
    .post-column {
        flex: none;
        width: 100%;
        order: 1;
    }
    
    .content-column {
        flex: none;
        width: 100%;
        order: 2;
    }
    
    .gallery-items-right {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .article-comments {
        margin-top: 5px;
        padding: 15px;
    }
    
    .related-posts {
        margin: 10px 0 0 0;
        padding: 5px;
    }
    
    .post-column .element .top .social {
        left: 10px;
        top: 8px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Мобильная адаптация для модального окна галереи */
    .gallery-modal-content {
        width: 95%;
        height: 95%;
        padding: 10px;
    }
    
    .gallery-thumbnails {
        max-height: 80px;
    }
    
    .gallery-thumbnail {
        width: 40px;
        height: 40px;
    }
}


/* Яркие анимированные эмодзи для модального окна - ОРАНЖЕВАЯ ТЕМА */
#dynamic-comment-modal .emoji-btn {
    filter: brightness(1.3) saturate(1.8) hue-rotate(-10deg);
    transition: all 0.3s ease;
    animation: emoji-float 3s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.1s);
    border: 1px solid #ff8c00 !important;
}

#dynamic-comment-modal .emoji-btn:hover {
    filter: brightness(1.6) saturate(2.2) hue-rotate(-15deg);
    transform: scale(1.3) rotate(5deg);
    animation: none;
    background: rgba(255, 140, 0, 0.1) !important;
    border-color: #ff6a00 !important;
}

/* Анимация плавающего эмодзи */
@keyframes emoji-float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        filter: brightness(1.3) saturate(1.8) hue-rotate(-10deg);
    }
    50% { 
        transform: translateY(-3px) rotate(2deg);
        filter: brightness(1.5) saturate(2) hue-rotate(-12deg);
    }
}

/* Яркая кнопка переключения эмодзи - ОРАНЖЕВАЯ */
#emoji-toggle-btn {
    filter: brightness(1.4) saturate(1.8) hue-rotate(-10deg);
    animation: toggle-pulse 2s infinite;
    transition: all 0.3s ease;
    background: rgba(255, 140, 0, 0.1) !important;
    border: 1px solid #ff8c00 !important;
}

#emoji-toggle-btn:hover {
    filter: brightness(1.8) saturate(2.5) hue-rotate(-15deg);
    transform: scale(1.2);
    animation: none;
    background: rgba(255, 140, 0, 0.2) !important;
    border-color: #ff6a00 !important;
}

@keyframes toggle-pulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1.4) saturate(1.8) hue-rotate(-10deg);
    }
    50% { 
        transform: scale(1.1);
        filter: brightness(1.6) saturate(2) hue-rotate(-12deg);
    }
}

/* Яркая панель эмодзи - ОРАНЖЕВАЯ */
#emoji-panel {
    border: 2px solid #ff8c00 !important;
    box-shadow: 0 5px 20px rgba(255, 140, 0, 0.4) !important;
    background: linear-gradient(135deg, #fffaf0, #fff5e6) !important;
}

/* Заголовок модального окна с ярким эмодзи - ОРАНЖЕВЫЙ */
#dynamic-comment-modal h3 [role="img"] {
    filter: brightness(1.4) saturate(2) hue-rotate(-10deg);
    animation: title-bounce 2s infinite;
    display: inline-block;
}

@keyframes title-bounce {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: brightness(1.4) saturate(2) hue-rotate(-10deg);
    }
    25% { 
        transform: scale(1.1) rotate(-2deg);
        filter: brightness(1.6) saturate(2.2) hue-rotate(-12deg);
    }
    75% { 
        transform: scale(1.1) rotate(2deg);
        filter: brightness(1.6) saturate(2.2) hue-rotate(-12deg);
    }
}

/* Дополнительные оранжевые акценты */
.emoji-category-title {
    color: #ff8c00 !important;
    font-weight: bold !important;
}

/* Свечение при открытии панели - ОРАНЖЕВОЕ */
#emoji-panel {
    animation: panel-glow 0.5s ease-out;
}

@keyframes panel-glow {
    0% { 
        opacity: 0;
        transform: translateY(10px) scale(0.9);
        box-shadow: 0 0 0 rgba(255, 140, 0, 0);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 5px 20px rgba(255, 140, 0, 0.4);
    }
}

/* Эффект при клике на эмодзи - ОРАНЖЕВЫЙ */
#dynamic-comment-modal .emoji-btn:active {
    filter: brightness(2) saturate(3) hue-rotate(-20deg) !important;
    transform: scale(1.8) !important;
    background: rgba(255, 140, 0, 0.3) !important;
}
/* Основные стили модального окна */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.gallery-modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    z-index: 1001;
}

/* Кнопка закрытия */
.gallery-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-close:hover {
    background: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Основная область медиа */
.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1001;
}

.gallery-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001;
}

.gallery-slide img,
.gallery-slide video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.3s ease;
}

/* Контейнер для видео с кнопкой воспроизведения */
.video-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Кнопка воспроизведения поверх видео */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1003;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}

.video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Треугольник воспроизведения */
.play-triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 26px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 5px;
}

/* Скрываем кнопку когда видео воспроизводится */
.video-container.playing .video-play-overlay {
    opacity: 0;
    visibility: hidden;
}

.video-container.playing .video-play-overlay:hover {
    opacity: 0.7;
    visibility: visible;
}

/* Стили для видео с постером */
.gallery-slide video[poster] {
    background: transparent;
    object-fit: contain;
}

/* Элементы управления */
.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
    background: rgba(0, 0, 0, 0.3);
    gap: 20px;
    position: relative;
    z-index: 1001;
	transform: translateY(-103px); /* Поднимаем вверх на 30px */
	margin-bottom: -20px; /* Компенсируем смещение для других элементов */
}

.gallery-prev,
.gallery-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.gallery-counter {
    color: white;
    font-size: 16px;
    font-weight: bold;
    min-width: 80px;
    text-align: center;
}

/* Стили для миниатюр */
.gallery-thumbnails {
    display: flex;
    gap: 8px;
    padding: 15px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 8px 8px;
    min-height: 90px;
    align-items: center;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.gallery-thumbnail {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.gallery-thumbnail:hover {
    transform: translateY(-2px);
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.gallery-thumbnail.active {
    border-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
}

/* Стили для элементов внутри миниатюр */
.gallery-thumbnail img,
.gallery-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Скрываем стандартные controls для видео в миниатюрах */
.gallery-thumbnail video {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.gallery-thumbnail video::-webkit-media-controls {
    display: none !important;
}

/* Элементы управления для видео миниатюр */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    z-index: 2;
}

.video-type-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1px 3px;
    border-radius: 2px;
    font-size: 8px;
    z-index: 2;
}

/* Временные миниатюры */
.temp-thumbnail {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: absolute;
    top: 0;
    left: 0;
}

.temp-thumbnail.error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.thumbnail-number {
    font-size: 14px;
    margin-bottom: 2px;
}

.thumbnail-type {
    font-size: 12px;
    opacity: 0.9;
}

.thumbnail-label {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 8px;
    z-index: 2;
}

/* Стили для загрузки */
.media-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: white;
    font-size: 18px;
    gap: 15px;
}

.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Сообщения об ошибках */
.error-message {
    text-align: center;
    padding: 40px;
    color: white;
}

.error-message div:first-child {
    font-size: 48px;
    margin-bottom: 10px;
}

.error-message div:nth-child(2) {
    font-size: 18px;
    margin-bottom: 20px;
}

.error-message button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.error-message button:hover {
    background: #2980b9;
}

/* Адаптивность */
@media (max-width: 768px) {
    .gallery-close {
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .gallery-main {
        padding: 10px;
    }
    
    .gallery-controls {
        padding: 10px;
    }
    
    .gallery-prev,
    .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .gallery-thumbnails {
        padding: 10px;
        min-height: 80px;
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .video-play-overlay {
        width: 60px;
        height: 60px;
    }
    
    .play-triangle {
        border-width: 12px 0 12px 20px;
    }
    
    .thumbnail-number {
        font-size: 12px;
    }
    
    .thumbnail-type {
        font-size: 10px;
    }
    
    .video-play-icon {
        width: 20px;
        height: 20px;
        font-size: 8px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*Эмодзи в статьях конета*/

.section-header {
    display: flex;
    align-items: center;
    gap: 10px; /*отступ от эмодзи заголовка*/
    margin-bottom: 10px;

}
.section-header h3 {
    width: 100%; /* На всю ширину */
    display: block; /* Убеждаемся, что блочный */
}

.section-header .emoji {
    font-size: 1.2em;
}

.section-header h2,
.section-header h3,
.section-header h4 {
    margin-bottom: 0px;
}

/* Для списков с эмодзи */
ul li .emoji {
    margin-right: 8px;
}


/* Базовые стили для сетки */
/* ОСНОВНАЯ СЕТКА */
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 0px;
    align-items: stretch;
}

/* Дополнительные настройки для разных экранов */
@media (max-width: 1200px) {
    .related-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 9px;
    }
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}

/* FLEX РАСКЛАДКА ДЛЯ 1-3 ПОСТОВ - фиксированные размеры */
.related-posts-grid.flex-layout {
    display: grid;
    justify-content: start;
    gap: 10px;
}

/* Для 1 поста */
.related-posts-grid.flex-layout:has(.element:only-child) {
    grid-template-columns: 280px;
}

/* Для 2 постов */
.related-posts-grid.flex-layout:has(.element:nth-child(2):last-child) {
    grid-template-columns: 280px 280px;
}

/* Для 3 постов - ТРИ КОЛОНКИ */
.related-posts-grid.flex-layout:has(.element:nth-child(3):last-child) {
    grid-template-columns: 280px 280px 280px;
}

/* Адаптивность для flex раскладки */
@media (max-width: 1200px) {
    .related-posts-grid.flex-layout:has(.element:only-child) {
        grid-template-columns: 260px;
    }
    
    .related-posts-grid.flex-layout:has(.element:nth-child(2):last-child) {
        grid-template-columns: 260px 260px;
    }
    
    /* Для 3 постов на 1200px+ */
    .related-posts-grid.flex-layout:has(.element:nth-child(3):last-child) {
        grid-template-columns: 260px 260px 260px;
    }
}

@media (max-width: 768px) {
    .related-posts-grid.flex-layout:has(.element:only-child) {
        grid-template-columns: 240px;
    }
    
    .related-posts-grid.flex-layout:has(.element:nth-child(2):last-child) {
        grid-template-columns: 240px 240px;
    }
    
    /* Для 3 постов на 768px+ - переходим на 2 колонки */
    .related-posts-grid.flex-layout:has(.element:nth-child(3):last-child) {
        grid-template-columns: 240px 240px;
    }
}

@media (max-width: 478px) {
    .related-posts-grid.flex-layout {
        grid-template-columns: 1fr !important;
        justify-content: center;
        gap: 7px;
    }
    
    .related-posts-grid.flex-layout:has(.element:only-child) {
        max-width: 400px;
        margin: 0 auto;
    }
}
/* для сохранения в PDF  НЕ СТАЛ ДЕЛАТЬ КОМУ НАДО ПРИНТ СКРИН САМ ЭКРАНА СДЕЛАЕТ*/

/* Стили для модального окна видео */
/* Стили для модального окна видео */
.modal-video {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s;
}

.modal-video-content {
    position: relative;
    background: #000;
    margin: 1% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,0.8);
    animation: slideInUp 0.3s;
}

.modal-video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    border-bottom: 1px solid #333;
}

.modal-video-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-video-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: color 0.3s;
    line-height: 1;
}

.modal-video-close:hover {
    color: #ff3333;
}

.modal-video-body {
    padding: 0;
}

#videoPlayer {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    background: #000;
}

#videoPlayer iframe,
#videoPlayer video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 15px 20px;
    background: #1a1a1a;
    color: #ccc;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #333;
}

/* Кастомный лоадер */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.video-loading-spinner {
    border: 3px solid #333;
    border-top: 3px solid #ff4444;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Кнопка просмотра видео */
.video-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.video-preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
    background: linear-gradient(135deg, #ff5555, #dd0000);
}

.video-preview-btn:before {
    content: '▶';
    font-size: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .modal-video-content {
        width: 98%;
        margin: 0 auto;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-video-header {
        padding: 12px 15px;
    }
	
}

