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

html, body, h1, h2, h3, h4, h5, h6, .widget, p {
    font-family: 'Nunito', sans-serif;
    color: #000;
}

.content p {
    text-indent: 1.5em;
}

.content p:has(img) {
    text-indent: 0;
}

.content p:has(iframe) {
    text-indent: 0;
}

body {
    background-image: url(/templates/salut-bg.webp);
    background-size: cover;
    background-color: #fff8dc;
    background-repeat: no-repeat;
    background-attachment: fixed;
	margin: 0;
}

.menu, .container, .footer {
	max-width: 1220px;
	display: flex;
	margin: 0 auto;
	width: 100%;
}

.fixed {
        position: fixed; /* Фиксируем меню */
        top: 0; /* Располагаем его вверху */
        left: 0;
        right: 0;
        z-index: 1000; /* Устанавливаем уровень слоя */
}

.header-main {
    /* display: flex;
    justify-content: space-between;
    align-items: center; */
    background-color: #b9e7f5;
    height: 298px;
}

.header-left {
    background-image: url('/templates/salut3.png');
    background-repeat: no-repeat;
    background-size: auto 300px;
    background-position: center;
    background-color: #bae9f8
    height: 100%;
}

.header-right {
    width: auto; /* Автоматическая ширина */
    height: 298px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Выравнивание изображения по верхнему краю */
    position: relative;
}

.header-right img {
    display: none;
    height: 100%; /* Масштабируем изображение по высоте 120px */
    width: auto; /* Пропорциональная ширина */
    /*margin-top: -70px; /* Смещение вверх на 20px */
}

.header-text {
   /* position: absolute;
    bottom: -100px;
    right: 30px;
    text-align: right; */
    white-space: nowrap; /* Запрещает перенос строк */
    overflow: visible; /* Позволяет тексту выходить за пределы блока */
    margin-top: 50px;
}

.header-text h1 {
    margin: 0;
    font-size: 45px;
    color: white;
    text-shadow: 3px 3px 10px black;
}

.header-text h2 {
    display: none;
    margin: 0;
    font-size: 14px;
    color: white;
    text-shadow: 3px 3px 10px black;
}

.menu-container {
    width: 100%;
    background: #ff0000;
    position: relative;
    z-index: 1000;
}

.container {
    flex-wrap: wrap;
    background-color: #cbdb889e;

}

.container a {
    text-decoration: none;
    /* color: #b377ff; */
}
.post {
	margin: 0 0 15px;
	border-bottom: 2px solid #8FB7C7;
	padding-bottom: 10px;
}

.post H2 {
	margin: 0 0 5px;
}

.pub-date {
	font-size: 12px;
	margin: 0 0 15px;
}

.content {
    flex: 1;
    min-width: 0; /* Предотвращает переполнение flex-элемента */
    order: 1; /* Порядок по умолчанию */
}

.content > h2 {
    padding: 0 20px 10px;
}

/* Стили для кнопки */
        .ticket-button {
            display: inline-block;
            padding: 20px 40px;
            font-size: 24px;
            font-weight: bold;
            color: #fff !important;
            background-color: #7d4eb8; /* Оранжевый цвет */
            border: none;
            border-radius: 10px;
            text-align: center;
            text-decoration: none;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        /* Эффект при наведении */
        .ticket-button:hover {
            background-color: #e64a19; /* Темнее оранжевый */
        }

        /* Эффект при нажатии */
        .ticket-button:active {
            background-color: #d84315; /* Еще темнее */
        }

details {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 10px;
}

summary {
    color: #b377ff;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}

summary:hover {
    background-color: #b377ff;
    color: white;
}

details[open] summary {
    background-color: #b377ff;
    color: white;
}

.footer {
    font-size: 12px;
	/*background-color: #e3e3e3;*/
	text-align: center;
    padding: 10px;
    text-align: center;
}

.pagination {
    margin: 20px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.pagination .page-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #3f4141;
    color: #dfdfdf !important;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #653f95;
    border-color: #7d4eb8;
}

.pagination .page-link.active {
    background-color: #653f95;
    border-color: #7d4eb8;
    color: #ffffff !important;
}

/* Основное меню */
.menu {
    padding: 0 20px;
    position: relative;
}

.menu > ul {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none; /* Убираем маркеры у всех ul */
}

/* Пункты меню */
.menu li {
    position: relative; /* Позволяет подменю позиционироваться относительно родителя */
    list-style: none; /* Убираем маркеры у li */
	text-shadow: 3px 3px 7px black;
    padding: 0;
}

/* Общие стили для всех ссылок в меню и подменю */
.menu a,
.submenu a {
    display: block;
    color: white;
    text-decoration: none;
    text-align: left;
}

/* Различающиеся стили */
.menu a {
    padding: 14px 20px;
}

.submenu a {
    padding: 10px 20px;
}

/* Стили для ссылок при наведении */
.menu li:hover {
    background-color: #555;
}

/* Подменю скрыто по умолчанию */
.submenu {
    display: none; /* Скрыть подменю */
    position: absolute; /* Абсолютное позиционирование подменю относительно родительского элемента */
    top: 100%; /* Расположим подменю непосредственно под родительским элементом */
    left: 0;
    background-color: #333;
    min-width: 280px;
    padding: 0;
    z-index: 1000; /* Тот же z-index для подменю */
}

.submenu ul {
    padding: 0;
}

/* Показываем подменю при наведении на родительский элемент */
.menu li:hover .submenu {
    display: block; /* Подменю становится видимым */
}

/* Стили для элементов подменю */
.submenu li {
    list-style: none; /* Убираем маркеры у li в подменю */
	text-shadow: 3px 3px 7px black;
}

/* Стили для ссылок подменю при наведении */
.submenu a:hover {
    background-color: #f53535;
}

.home-post, .single-post {
   /* background-color: #8aab83ed; */
    /* border-radius: 8px; */
    padding: 20px;
    margin-bottom: 30px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #3f4141; */
    line-height: 1.6;
}

.sticky-post {
    border-left: 5px solid #623e92;
}

.post-header {
    margin-bottom: 15px;
    overflow: hidden;
}

.post-title h2 {
    color: #000;
    margin: 0 0 10px 0;
    font-size: 24px;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #dfdfdf;
}

.post-date, .post-category {
    padding: 4px 8px;
    background-color: #3a3d3d;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.single-post {
    line-height: 1.6;
}

.post-content {
    margin: 15px 0;
    line-height: 1.6;
    color: #dfdfdf;
    overflow: visible;
}

.post-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #3f4141;
    clear: both;
}

.read-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: #653f95;
    color: #dfdfdf !important;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more:hover {
    background-color: #7d4eb8;
    box-shadow: 0 0 10px rgba(125, 78, 184, 0.3);
}

/*---------------------------------------------------------------------------------------*/
/* Основной контейнер галереи */
.image-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    /*background-color: #f9f9f9;
    border: 1px solid #ddd;*/
    border-radius: 8px;
    max-width: 100%;
    margin: 0 auto;
  }
  
  /* Контейнер изображений */
  .wp-gallery {
    display: flex; /* Расположение изображений горизонтально */
    gap: 10px; /* Расстояние между изображениями */
    flex-wrap: wrap; /* Перенос на новую строку, если не помещаются */
    justify-content: center;
  }
  
  /* Стили ссылок в галерее */
  .wp-gallery img {
    display: block;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: transform 0.3s ease, border-color 0.3s ease;
  }
  
  /* Увеличение изображения при наведении */
  .wp-gallery img:hover {
    transform: scale(1.05);
    border-color: #0073aa;
  }
  
  /* Изображения внутри галереи */
  .wp-gallery img {
    display: block;
    max-width: 256px;
    object-fit: cover;
    border-radius: 5px;
  }
  
  /* Эффект при наведении на изображение */
  .wp-gallery a:hover img {
    filter: brightness(0.9);
  }
  
  
/*---------------------------------------------------------------------------------------*/

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .header-right img {
        height: 50%;   
    }

    .home-post {
        padding: 15px;
        line-height: 1.3 !important;
    }
    .single-post {
        line-height: 1.3 !important;
    }

    .post-title h2 {
        font-size: 20px;
    }

    .post-meta {
        flex-direction: column;
        gap: 8px;
    }

    .home-post-image {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 15px 0;
    }
    
}

/* Стили для PDF иконок */
a[href$=".pdf"]::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzODQgNTEyIj48cGF0aCBmaWxsPSIjZmYwMDAwIiBkPSJNMzY5LjkgOTcuOUwyODYgMTRDMjc3IDUgMjY0LjgtLjEgMjUyLjEtLjFINDhDMjEuNSAwIDAgMjEuNSAwIDQ4djQxNmMwIDI2LjUgMjEuNSA0OCA0OCA0OGgyODhjMjYuNSAwIDQ4LTIxLjUgNDgtNDhWMTMxLjljMC0xMi43LTUuMS0yNS0xNC4xLTM0em0tMjIuNiAyMi43YzIuMSAyLjEgMy41IDQuNiA0LjIgNy40SDI1NlYzMi41YzIuOC43IDUuMyAyLjEgNy40IDQuMmw4My45IDgzLjl6TTMzNiA0ODBINDhjLTguOCAwLTE2LTcuMi0xNi0xNlY0OGMwLTguOCA3LjItMTYgMTYtMTZoMTc2djEwNGMwIDEzLjMgMTAuNyAyNCAyNCAyNGgxMDR2MzA0YzAgOC44LTcuMiAxNi0xNiAxNnptLTIyLTE3MXYtMjRjMC00LjQtMy42LTgtOC04SDc4Yy00LjQgMC04IDMuNi04IDh2MjRjMCA0LjQgMy42IDggOCA4aDIyOGM0LjQgMCA4LTMuNiA4LTh6bTAgNjR2LTI0YzAtNC40LTMuNi04LTgtOEg3OGMtNC40IDAtOCAzLjYtOCA4djI0YzAgNC40IDMuNiA4IDggOGgyMjhjNC40IDAgOC0zLjYgOC04em0wIDY0di0yNGMwLTQuNC0zLjYtOC04LThINzhjLTQuNCAwLTggMy42LTggOHYyNGMwIDQuNCAzLjYgOCA4IDhoMjI4YzQuNCAwIDgtMy42IDgtOHoiLz48L3N2Zz4=');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* Word документы (.doc, .docx) */
a[href$=".doc"]::before,
a[href$=".docx"]::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzODQgNTEyIj48cGF0aCBmaWxsPSIjMDA0NENDIiBkPSJNMzY5LjkgOTcuOUwyODYgMTRDMjc3IDUgMjY0LjgtLjEgMjUyLjEtLjFINDhDMjEuNSAwIDAgMjEuNSAwIDQ4djQxNmMwIDI2LjUgMjEuNSA0OCA0OCA0OGgyODhjMjYuNSAwIDQ4LTIxLjUgNDgtNDhWMTMxLjljMC0xMi43LTUuMS0yNS0xNC4xLTM0ek0yNDAgMjcxLjlsLTYwIDg5LjFoLTIxLjNsLTYwLTg5LjFWMjk2aDI4LjF2LTU2LjZsNDMuMyA2NC4yaDIuMmw0MS4yLTY0LjJWMjk2SDI0MHYtMjQuMXoiLz48L3N2Zz4=');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* Excel файлы (.xls, .xlsx) */
a[href$=".xls"]::before,
a[href$=".xlsx"]::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzODQgNTEyIj48cGF0aCBmaWxsPSIjMDA3MjNiIiBkPSJNMzY5LjkgOTcuOUwyODYgMTRDMjc3IDUgMjY0LjgtLjEgMjUyLjEtLjFINDhDMjEuNSAwIDAgMjEuNSAwIDQ4djQxNmMwIDI2LjUgMjEuNSA0OCA0OCA0OGgyODhjMjYuNSAwIDQ4LTIxLjUgNDgtNDhWMTMxLjljMC0xMi43LTUuMS0yNS0xNC4xLTM0ek0yNDAgMjcxLjlsLTYwIDg5LjFoLTIxLjNsLTYwLTg5LjFWMjk2aDI4LjF2LTU2LjZsNDMuMyA2NC4yaDIuMmw0MS4yLTY0LjJWMjk2SDI0MHYtMjQuMXoiLz48L3N2Zz4=');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* PowerPoint файлы (.ppt, .pptx) */
a[href$=".ppt"]::before,
a[href$=".pptx"]::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzODQgNTEyIj48cGF0aCBmaWxsPSIjRDI0NzI2IiBkPSJNMzY5LjkgOTcuOUwyODYgMTRDMjc3IDUgMjY0LjgtLjEgMjUyLjEtLjFINDhDMjEuNSAwIDAgMjEuNSAwIDQ4djQxNmMwIDI2LjUgMjEuNSA0OCA0OCA0OGgyODhjMjYuNSAwIDQ4LTIxLjUgNDgtNDhWMTMxLjljMC0xMi43LTUuMS0yNS0xNC4xLTM0ek0yNDAgMjcxLjlsLTYwIDg5LjFoLTIxLjNsLTYwLTg5LjFWMjk2aDI4LjF2LTU2LjZsNDMuMyA2NC4yaDIuMmw0MS4yLTY0LjJWMjk2SDI0MHYtMjQuMXoiLz48L3N2Zz4=');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* Стили для сайдбара */
.sidebar {
    width: 300px;
    order: 2; /* Порядок по умолчанию */
}

.widget {
    /* background-color: #8aab83ed; */
    /* border-radius: 8px; */
    padding: 15px;
    /* margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #3f4141; */
}

.widget h3 {
    color: #000;
    font-size: 20px;
    padding-bottom: 10px;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 8px 0;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: #dfdfdf;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #b377ff;
}

/* Специальные стили для разных типов виджетов */
.widget-search input[type="text"] {
    width: 100%;
    padding: 8px;
    background-color: #3a3d3d;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    color: #dfdfdf;
    margin-bottom: 10px;
}

.widget-search button {
    width: 100%;
    padding: 8px;
    background-color: #653f95;
    color: #dfdfdf;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.widget-search button:hover {
    background-color: #7d4eb8;
}

.widget-categories .category-count {
    float: right;
    background-color: #3a3d3d;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: #dfdfdf;
}

.widget-recent-posts .post-date {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Стили для блока цитат */
.quote-block {
    margin: 40px 0 20px;
    padding: 20px;
    background-color: #323535;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.random-quote blockquote {
    margin: 0;
    padding: 0 0 0 20px;
    border-left: 4px solid #ddd;
    font-style: italic;
}

.quote-text {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 10px;
}

.quote-author {
    display: block;
    text-align: right;
    font-weight: bold;
    font-style: normal;
    margin-top: 10px;
    color: #888;
}

.quote-category {
    margin-top: 0;
    font-size: 0.9em;
    color: #888;
    text-align: right;
}

[data-visibility-mode="high-visibility"] .quote-block {
    background-color: #000;
    color: #fff;
    border: 2px solid #fff;
}

[data-visibility-mode="high-visibility"] .random-quote blockquote {
    border-left-color: #fff;
}

[data-visibility-mode="high-visibility"] .quote-text,
[data-visibility-mode="high-visibility"] .quote-author,
[data-visibility-mode="high-visibility"] .quote-category {
    color: #fff;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 0; /* Убираем padding на мобильных */
    }
    
    .content {
        width: 100%;
        order: 1;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .widget {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .wp-gallery img {
        max-width: 45%;
    }

}

/* Стили для контейнера с видео */
.post-content iframe,
.static-page iframe {
    max-width: 100%;
    width: 100%;
    height: 480px; /* Фиксированная высота для видео */
    display: block;
    margin: 1em auto;
}

/* Убираем лишние отступы у параграфов, содержащих iframe */
.post-content p:has(iframe),
.static-page p:has(iframe) {
    margin: 0;
    padding: 0;
}

/* Стили для изображения в посте */
.home-post-image {
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    overflow: hidden;
}

.home-post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    transition: opacity 0.3s;
}

.home-post-image img:hover {
    opacity: 0.8;
}

/* Стили для одиночного поста */
.single-post {
    position: relative;
    margin-bottom: 2em;
    clear: both;
    overflow: hidden;
}

.single-post .home-post-image {
    float: right;
    margin: 0 0 1em 1em;
    max-width: 250px;
    height: auto;
    overflow: hidden;
}

.single-post .home-post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    transition: opacity 0.3s;
}

.single-post .post-content {
    overflow: hidden;
}

/* Добавляем очистку после контента */
.single-post:after {
    content: "";
    display: table;
    clear: both;
}

/* Стили для iframe внутри поста */
.single-post iframe {
    clear: both;
    display: block;
    margin: 1em auto;
    max-width: 100%;
}

/* Убираем лишние отступы у параграфов с iframe */
.single-post p:has(iframe) {
    margin: 0;
    padding: 0;
}

.posts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.grid-post {
    flex: 0 0 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    border: 2px solid #3f4141;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    text-decoration: none;
    transition: box-shadow 0.3s ease;
}

.grid-post:hover {
    box-shadow: 0 0 15px rgba(101, 63, 149, 0.4);
    border-color: #653f95;
}

.grid-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.grid-post-title {
    padding: 10px;
    margin: 0;
    font-size: 1.2em;
    color: #b377ff;
}

.grid-post-description {
    padding: 0 10px;
    margin-bottom: 10px;
    color: #dfdfdf;
}

.grid-read-more {
    margin: 10px;
    padding: 5px 10px;
    background-color: #653f95;
    color: #dfdfdf !important;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    margin-top: auto;
    transition: background-color 0.3s ease;
}

.grid-read-more:hover {
    background-color: #7d4eb8;
}

@media (max-width: 768px) {
    .grid-post {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .grid-post {
        flex: 0 0 100%;
    }
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .home-post-image,
    .single-post .home-post-image {
        float: none;
        max-width: 100%;
        margin: 0 0 1em 0;
    }
    
    .home-post-image img,
    .single-post .home-post-image img {
        width: 100%;
        object-fit: cover;
    }
}

/* Стили для активного пункта меню */
.menu li.active,
.menu li.active > a {
    background-color: #c50000;
}

/* Стили для родительского пункта активного подпункта */
.menu li.parent-active,
.menu li.parent-active > a {
    background-color: #c50000; /* Более темный оттенок */
}

.post-content-wrapper {
    position: relative;
    width: 100%;
}

.post-image-container {
    float: right;
    margin: 0 0 10px 20px;
    max-width: 40%;
}

.post-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.post-text {
    width: auto;
}

/* Заголовки теперь тоже будут обтекать изображение */
.post-text h1,
.post-text h2,
.post-text h3,
.post-text h4,
.post-text h5,
.post-text h6 {
    margin: 1em 0;
    width: auto;
}

/* Точная копия стилей grid для gallery */
.gallery-posts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.gallery-post {
    text-align: center;
    flex: 0 0 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    border: 2px solid #3f4141;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    text-decoration: none;
    transition: box-shadow 0.3s ease;
}

.gallery-post:hover {
    box-shadow: 0 0 15px rgba(101, 63, 149, 0.4);
    border-color: #653f95;
}

.gallery-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-post-title {
    padding: 10px;
    margin: 0;
    font-size: 1.2em;
    color: #b377ff;
}

.gallery-post-description {
    padding: 0 10px;
    margin-bottom: 10px;
    color: #dfdfdf;
}

.gallery-read-more {
    margin: 10px;
    padding: 5px 10px;
    background-color: #653f95;
    color: #dfdfdf !important;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    margin-top: auto;
    transition: background-color 0.3s ease;
}

.gallery-read-more:hover {
    background-color: #7d4eb8;
}

@media (max-width: 768px) {
    .gallery-post {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .gallery-post {
        flex: 0 0 100%;
    }
}

/* Стили для контейнера с видео */
.post-content iframe,
.static-page iframe {
    max-width: 100%;
    width: 100%;
    height: 480px; /* Фиксированная высота для видео */
    display: block;
    margin: 1em auto;
}

/* Убираем лишние отступы у параграфов, содержащих iframe */
.post-content p:has(iframe),
.static-page p:has(iframe) {
    margin: 0;
    padding: 0;
}

/* Стили для контейнера поста */

/* Стили для изображения в посте */
.home-post-image {
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    overflow: hidden;
}

.home-post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    transition: opacity 0.3s;
}

.home-post-image img:hover {
    opacity: 0.8;
}

/* Стили для одиночного поста */
.single-post {
    position: relative;
    margin-bottom: 2em;
    clear: both;
    overflow: hidden;
}

.single-post .home-post-image {
    float: right;
    margin: 0 0 1em 1em;
    max-width: 250px;
    height: auto;
    overflow: hidden;
}

.single-post .home-post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    transition: opacity 0.3s;
}

.single-post .post-content {
    overflow: hidden;
}

/* Добавляем очистку после контента */
.single-post:after {
    content: "";
    display: table;
    clear: both;
}

/* Стили для iframe внутри поста */
.single-post iframe {
    clear: both;
    display: block;
    margin: 1em auto;
    max-width: 100%;
}

/* Убираем лишние отступы у параграфов с iframe */
.single-post p:has(iframe) {
    margin: 0;
    padding: 0;
}

.posts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.grid-post {
    flex: 0 0 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    border: 2px solid #3f4141;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    text-decoration: none;
    transition: box-shadow 0.3s ease;
}

.grid-post:hover {
    box-shadow: 0 0 15px rgba(101, 63, 149, 0.4);
    border-color: #653f95;
}

.grid-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.grid-post-title {
    padding: 10px;
    margin: 0;
    font-size: 1.2em;
    color: #b377ff;
}

.grid-post-description {
    padding: 0 10px;
    margin-bottom: 10px;
    color: #dfdfdf;
}

.grid-read-more {
    margin: 10px;
    padding: 5px 10px;
    background-color: #653f95;
    color: #dfdfdf !important;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    margin-top: auto;
    transition: background-color 0.3s ease;
}

.grid-read-more:hover {
    background-color: #7d4eb8;
}

@media (max-width: 768px) {
    .grid-post {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .grid-post {
        flex: 0 0 100%;
    }
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .home-post-image,
    .single-post .home-post-image {
        float: none;
        max-width: 100%;
        margin: 0 0 1em 0;
    }
    
    .home-post-image img,
    .single-post .home-post-image img {
        width: 100%;
        object-fit: cover;
    }
}

.post-content-wrapper {
    position: relative;
    width: 100%;
}

.post-image-container {
    float: right;
    margin: 0 0 10px 20px;
    max-width: 40%;
}

.post-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.post-text {
    width: auto;
}

/* Заголовки теперь тоже будут обтекать изображение */
.post-text h1,
.post-text h2,
.post-text h3,
.post-text h4,
.post-text h5,
.post-text h6 {
    margin: 1em 0;
    width: auto;
}

/* Стили для галереи */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
    width: 100% !important;
    clear: both;
    /* Добавляем отступ сверху, равный максимальной высоте изображения плюс отступ */
    margin-top: calc(40vh + 20px);
    /* Сдвигаем галерею вверх на реальную высоту изображения */
    margin-bottom: calc(-40vh + 20px);
    position: relative;
}

.gallery-item {
    position: relative;
    padding-bottom: 100%;
}

.gallery-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Очистка обтекания только для галереи */
.post-text .gallery-container {
    float: none;
    width: 100% !important;
    clear: both;
}

.post-full {
    display: flow-root;
    width: 100%;
}

/* Стили для wp-gallery */
.wp-gallery {
    width: 100% !important;
    clear: both;
    float: none;
    margin-top: 20px;
}

/* Стили для галереи внутри */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    width: 100% !important;
}

.gallery-item {
    position: relative;
    padding-bottom: 100%;
}

.gallery-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Стили для отзывов */
.review-form-container {
    background: #3f4141;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #4a4a4a;
}

.review-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.review-form .form-group {
    margin-bottom: 20px;
}

/* Поля имя и email на одной строке */
.review-form .form-group:nth-child(1),
.review-form .form-group:nth-child(2) {
    flex: 1;
    min-width: 200px;
}

/* Поле отзыва на всю ширину */
.review-form .form-group:nth-child(3) {
    width: 100%;
}

/* Капча на всю ширину */
.review-form .form-group:nth-child(4) {
    width: 100%;
}

.review-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #dfdfdf;
}

.review-form input,
.review-form textarea {
    width: 100%;
    padding: 10px;
    background-color: #3a3d3d;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    color: #dfdfdf;
    font-size: 14px;
}

.review-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Стили для списка отзывов */
.review-item {
    background: #3f4141;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    margin: 0;
    color: #b377ff;
    font-size: 1.1em;
}

.review-date {
    color: #dfdfdf;
    font-size: 0.9em;
    background-color: #3a3d3d;
    padding: 4px 8px;
    border-radius: 4px;
}

.review-content {
    color: #dfdfdf;
    line-height: 1.6;
}

.no-reviews {
    text-align: center;
    color: #dfdfdf;
    font-style: italic;
    margin: 30px 0;
}

/* Стили для алертов */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #2f4f2f;
    border: 1px solid #3d663d;
    color: #98c098;
}

.alert-danger {
    background-color: #4f2f2f;
    border: 1px solid #663d3d;
    color: #c09898;
}

/* Добавляем кнопку бургер-меню */
.menu-toggle {
    display: none;
    padding: 15px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    color: white;
    align-items: center;
    gap: 10px;
}

.menu-toggle span:not(.menu-text) {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: 0.3s;
}

.menu-text {
    font-size: 16px;
    background: none !important;
    height: auto !important;
    margin: 0 0 0 5px !important;
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    .menu {
        padding: 0;
    }

    .menu-toggle {
        display: flex;
        position: relative;
    }

    .menu > ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #333;
        width: 100%;
        padding: 0;
        margin: 0;
        z-index: 1000;
    }

    .menu > ul.active {
        display: block !important;
    }

    .menu li {
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu li:last-child {
        border-bottom: none;
    }

    .menu a {
        padding: 15px 20px;
        display: block;
        color: #fff;
        text-decoration: none;
    }

    /* Стили для подменю в мобильной версии */
    .submenu {
        position: static !important;
        width: 100%;
        display: none;
        background: #444;
    }

    .has-submenu.active > .submenu {
        display: block !important;
    }

    .submenu a {
        padding-left: 30px;
    }

    /* Анимация для кнопки бургера */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* Стили для десктопной версии */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .menu > ul {
        display: flex !important;
    }

    .menu li {
        position: relative;
    }

    .menu .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 300px;
        display: none;
        background: #333;
    }

    .menu li:hover > .submenu {
        display: block;
    }
}

/* Базовые стили для главного заголовка */
h1.main-title {
    margin: 0 !important;
    font-size: 45px !important;
    color: white !important;
    text-shadow: 3px 3px 10px black !important;
}

/* Медиа-запрос для планшетов */
@media (max-width: 992px) {
    h1.main-title {
        font-size: 28px !important;
    }
    .header-text h2 {
        font-size: 9px !important;
    }
}


/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    h1.main-title {
        font-size: 22px !important;
    }
}

/* Медиа-запрос для маленьких мобильных устройств */
@media (max-width: 480px) {
    h1.main-title {
        font-size: 18px !important;
    }
}

/* Стили для адаптивных iframe, особенно для VK видео */
iframe[src*="vk.com/video_ext.php"] {
    display: flex;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9 !important;
    min-height: 240px !important;
}

/* Для поддержки старых браузеров */
@supports not (aspect-ratio: 16/9) {
    iframe[src*="vk.com/video_ext.php"] {
        height: 56.25vw !important; /* 16:9 */
    }
}

/* Медиа-запрос для маленьких экранов */
@media (max-width: 480px) {
    iframe[src*="vk.com/video_ext.php"] {
        height: 240px !important;
    }
} 