/* ============================================================
   Тема Dom — переопределения поверх core.css
   <link rel="stylesheet" href="/assets/css/core.css">
   <link rel="stylesheet" href="/assets/css/themes/dom.css">
   ============================================================ */

/* --- Шрифт и каркас страницы --- */
html, body, h1, h2, h3, h4, h5, h6, .widget, p {
    font-family: 'Conv_CYRIL', sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body {
    background-image: url('/templates/body-1.webp');
    background-size: auto;
    background-color: transparent;
    background-repeat: repeat;
    background-attachment: scroll;
}

/* --- Шапка --- */
.header-main {
    background-color: rgb(124, 124, 124);
    height: 265px;
}

.header-left {
    background-image: url('/templates/bg-header.png');
    background-size: 1280px auto;
    background-color: rgb(124, 124, 124);
    background-position: left center;
}

.header-right {
    height: 120px;
    justify-content: right;
}

.header-right img {
    display: block;
    height: 100%;
    width: auto;
}

.header-text {
    display: block;
    position: absolute;
    bottom: -100px;
    right: 30px;
    text-align: right;
    margin-top: 0;
}

.header-text h2 {
    display: block;
}

/* --- Меню-полоска --- */
.menu-container {
    background-image: url("/templates/header.webp");
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.footer-container {
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
}

/* --- Контентная «бумага» --- */
.container {
    background-color: transparent;
}

.full-content, .container {
    background-image: url('/templates/bumaga-2.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: local;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    flex: 1;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.container a {
    color: #db0000;
}

.after-container-block {
    max-width: 1220px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    background-color: #dec28e;
}

.after-container-section {
    flex: 1;
    min-width: 200px;
}

.content {
    padding: 15px 10px 15px 25px;
    overflow-y: auto;
    max-height: 100%;
    box-sizing: border-box;
    border-right: none;
}

/* --- Classic-меню --- */
.menu {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px 0 220px;
    height: 50px;
    display: flex;
    align-items: center;
    background: transparent;
}

.menu::before {
    content: "";
    display: block;
    width: 230px;
    height: 105px;
    background-image: url("/templates/dosdom.webp");
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    left: 0;
    top: 0;
}

.menu > ul {
    align-items: center;
}

.menu li {
    display: flex;
    align-items: center;
}

.menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #471d0f;
    text-decoration: none;
    text-align: left;
    height: 100%;
}

.menu li:hover {
    background-color: #db4b4b;
}

.submenu a {
    color: white;
    text-decoration: none;
    text-align: left;
}

.submenu a:hover {
    background-color: #777;
}

.menu li.active,
.menu li.active > a,
.submenu li.active,
.submenu li.active > a {
    background-color: #c12929;
    color: #ffffff;
}

.menu li.parent-active,
.menu li.parent-active > a {
    background-color: #4e3070;
    color: #ffffff;
}

.menu li.active:hover,
.menu li.active > a:hover,
.menu li.parent-active:hover,
.menu li.parent-active > a:hover,
.submenu li.active:hover,
.submenu li.active > a:hover {
    background-color: #811919;
}

/* --- Подвал --- */
footer {
    height: 50px;
    background-color: #333;
    color: white;
    text-align: center;
    line-height: 50px;
    background-image: url(/templates/header.webp);
}

.footer {
    position: relative;
    padding: 0 120px 0 0;
    font-size: inherit;
    text-align: left;
}

.footer-logo {
    display: block;
    height: 105px;
    position: absolute;
    right: 0;
    bottom: 0;
}

.form-control, .lightbox-close {
    font-family: "Arial", sans-serif;
}

/* --- Цвета (отличия от salut-core) --- */
.ticket-button {
    background-color: #811919;
}

summary:hover {
    background-color: #b377ff;
}

details[open] summary {
    background-color: #b377ff;
}

details {
    background-color: transparent;
}

.pagination .page-link:hover {
    background-color: #c12929;
    border-color: #811919;
}

.pagination .page-link.active {
    background-color: #c12929;
    border-color: #811919;
    color: #ffffff !important;
}

.sticky-post {
    border-left: 5px solid #623e92;
}

.post-meta {
    color: #000;
}

.read-more {
    background-color: #c12929;
}

.read-more:hover {
    background-color: #811919;
}

.home-button {
    background-color: #c12929;
}

.home-button:hover {
    background-color: #9461d3;
}

/* --- Сайдбар и виджеты --- */
.sidebar {
    overflow-y: auto;
    max-height: 100%;
    border-left: 1px solid #999;
}

.widget {
    padding: 25px 15px 15px 15px;
    margin-bottom: 20px;
}

.widget a:hover {
    color: #b377ff;
    text-shadow: none;
}

.widget-search button {
    background-color: #c12929;
}

.widget-search button:hover {
    background-color: #811919;
}

/* --- Цитаты --- */
.quote-block {
    background-color: #cea261;
}

.quote-text {
    color: #444;
}

.quote-author {
    color: #666;
}

.quote-category {
    color: #888;
}

/* --- Сетка записей --- */
.grid-post,
.gallery-post {
    border: 1px solid #818181;
}

.grid-post:hover,
.gallery-post:hover {
    border-color: #c12929;
}

.grid-post-title,
.gallery-post-title {
    color: #9b0000;
}

.grid-post-description,
.gallery-post-description {
    color: #000;
}

.grid-read-more,
.gallery-read-more {
    background-color: #c12929;
}

.grid-read-more:hover,
.gallery-read-more:hover {
    background-color: #811919;
}

/* --- Отзывы --- */
.review-form-container {
    background: #c59756;
}

.review-form input,
.review-form textarea {
    background-color: #dab073;
}

.review-item {
    background: #dab073;
    border: 1px solid #c59756;
}

.review-author {
    color: #000;
}

.review-content {
    color: #000;
}

/* --- Прочее --- */
.inner-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.inner-form form {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.inner-form input[type="text"],
.inner-form select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
}

.inner-form button {
    padding: 8px 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.inner-form button:hover {
    background-color: #555;
}

.inner-form ul {
    list-style: none;
    padding: 0;
}

.inner-form ul li {
    margin: 10px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.inner-form ul ul {
    margin-left: 20px;
}

.posts-grid,
.gallery-posts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

/* --- Десктоп: выпадающие подменю --- */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .menu > ul {
        display: flex !important;
    }

    .menu .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 300px;
        display: none;
        background: #333;
    }

    .menu .submenu .submenu {
        top: 0;
        left: 100%;
    }

    .menu li:hover > .submenu,
    .submenu li:hover > .submenu {
        display: block;
    }
}

@media (max-width: 992px) {
    h1.main-title {
        font-size: 28px !important;
    }

    .header-text h2 {
        font-size: 9px !important;
    }
}

/* --- Мобильная версия --- */
@media (max-width: 768px) {
    body {
        background-image: none;
    }

    .menu {
        padding: 0;
    }

    .menu::before {
        left: auto;
        right: 50px;
        width: 150px;
    }

    .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;
        max-height: calc(100vh - 3.5rem);
        max-height: calc(100dvh - 3.5rem);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    body.pk-menu-scroll-lock {
        overflow: hidden;
        overscroll-behavior: none;
    }

    .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;
    }

    .submenu {
        position: static !important;
        width: 100%;
        display: none;
        background: #444;
    }

    .has-submenu.active > .submenu {
        display: block !important;
    }

    .submenu a {
        padding-left: 30px;
    }

    .submenu .submenu a {
        padding-left: 45px;
    }

    .submenu .submenu .submenu a {
        padding-left: 60px;
    }

    .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);
    }

    .container {
        background-image: none;
        background-color: #e2c594;
        flex-direction: column !important;
        padding: 0;
        overflow: visible;
        min-height: auto;
        margin: 0;
        flex-wrap: nowrap !important;
    }

    .content {
        width: 100%;
        max-width: none;
        order: 1;
        overflow: visible;
        padding: 15px;
        flex: none;
    }

    .sidebar {
        width: 100%;
        order: 2;
        border-left: none;
        border-top: 1px solid #999;
        flex: none;
    }

    .widget {
        margin-bottom: 15px;
        padding: 12px;
    }

    .wp-gallery img {
        max-width: 170px;
    }

    .header-right img {
        height: 50%;
    }

    .home-post,
    .single-post {
        line-height: 1.3 !important;
    }

    h1.main-title {
        font-size: 22px !important;
    }

    .post-title h1,
    .post-title h2 {
        font-size: 20px;
    }

    .post-meta {
        gap: 0;
    }

    .home-post-image,
    .single-post .home-post-image {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 15px 0;
    }

    .home-post-image img,
    .single-post .home-post-image img {
        width: 100%;
        object-fit: cover;
    }

    .inner-form form {
        flex-direction: column;
    }

    .inner-form input[type="text"],
    .inner-form select,
    .inner-form button {
        width: 100%;
    }

    .inner-form ul ul {
        margin-left: 10px;
    }

    .grid-post,
    .gallery-post {
        flex: 0 0 calc(50% - 20px);
    }

    .footer {
        box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
    }

    .footer p {
        font-size: 10px;
        padding-left: 10px;
    }

    .footer-logo {
        height: 70px;
    }
}

@media (max-width: 480px) {
    h1.main-title {
        font-size: 18px !important;
    }

    .grid-post,
    .gallery-post {
        flex: 0 0 100%;
    }

    iframe[src*="vk.com/video_ext.php"] {
        height: 240px !important;
    }
}
