@media (max-width: 1330px) {
    .g-cols.via_grid {
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .g-cols.via_grid {
        gap: 1rem;
    }

    .main_grid .g-cols.via_grid {
        grid-template-columns: 4fr 2fr;
    }
}

.no_wrap {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .flex_wrap_mobile {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
    }
}

.w-btn-wrapper:has(.btn_no_margin) {
    margin: 0;
}

/* Таблица */
.deputat_table {
    font-size: 0.9rem;
    line-height: 1.1;
}

.deputat_table img {
    max-height: 150px;
}

.deputat_table td {
    vertical-align: middle;
}

@media (max-width: 768px) {
    .deputat_table tr {
        font-size: 1rem;
        display: flex;
        flex-direction: column;
        border: 1px solid var(--color-content-border);
        margin-bottom: 1rem;
    }
}


/* Мега меню */
.mega_menu {
    font-size: 0.9rem;
    line-height: 1.1;
}


/* Шапка */
@media (min-width: 1025px) {
    header {
        background: linear-gradient(90deg, #ffffff, transparent);
        background-image: url(https://volgodonskduma.ru/wp-content/uploads/2025/11/main_bg_duma.jpg);
        background-repeat: no-repeat;
        background-position: calc((100vw - var(--site-content-width)) / 2 + (var(--site-content-width) * 0.15)) top;
        background-size: var(--site-content-width);
    }

    .sticky .l-subheader.at_middle {
        background: var(--color-header-middle-bg) !important;
        transition: background 0.01s ease, height 0.1s ease !important;
    }

    .l-subheader.at_middle {
        background: transparent !important;
    }
}


.header_menu {

}

.header_menu ul.level_1 > li:first-child {
    margin-left: 20px;
}

.header_menu ul.level_1 > li:first-child > a {
    padding: 0.75rem 2rem;
}

.header_menu .w-text {
    margin-bottom: 0.5rem;
    padding-bottom: 0;
}

.header_menu .w-text-value {
    font-size: 1.1rem;
}

.header_menu .widget_nav_menu {
    padding: 0;
}

.header_menu .w-separator.size_medium:empty {
    height: 1rem;
}

.header_menu .mega_menu li {
    line-height: 1.1 !important;
    margin-bottom: 0.5rem;
}

.header_menu .mega_menu a {
    font-size: 0.85rem;
}

.header_menu .us_page_block_with_rows .l-section {
    padding: 1.5rem;
}



@media (max-width: 1330px) {
    .header_hor .ush_menu_1.header_menu.type_desktop .menu-item.level_1>a.w-btn {
        font-size: 0.8rem;
        margin-right: 6px;
        padding: 0.5rem 1rem;
    }

    .header_hor .ush_menu_1.header_menu.type_desktop .menu-item.level_1>a:not(.w-btn) {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 0.8rem;
    }

    .header_hor .ush_menu_1.header_menu.type_desktop .menu-item.level_1:nth-last-child(2)>a:not(.w-btn) {
        padding-right: 0 !important;
        margin-right: 20px;
    }
}

.header_menu.type_mobile {

}

.header_hor .ush_menu_1.header_menu.type_mobile .w-nav-list.level_1 {
    max-width: calc(100% - 60px);
}

.header_hor .ush_menu_1.header_menu.type_mobile .menu-item.level_1>a:not(.w-nav-close) {
    display: none;
}

.header_hor .ush_menu_1.header_menu.type_mobile .w-nav-list.level_2 {
    height: auto !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.header_hor .ush_menu_1.header_menu.type_mobile .menu-item.level_1.togglable {
    margin-left: 0;
}

.header_hor .ush_menu_1.header_menu.type_mobile .us_page_block_with_rows .l-section {
    padding: 0;
}







    /* Календарь */
.widget_calendar #calendar_wrap {
    box-shadow: unset;
    padding: 0;
}

#wp-calendar caption {
    text-align: left;
    padding: 0 0 0.5rem 0;
}

.widget_calendar table {
    margin-bottom: 0.25rem;
}

.widget_calendar table th,
.widget_calendar table td {
    background: var(--color-content-bg-alt);
}

.wp-calendar-nav-prev {
    text-transform: lowercase;
    font-size: 0.9rem;
}

/* Видео */
.with_video p {
    width: 100%;
    height: auto;
    display: block;
    background:#000;
}

.with_video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
    background:#000;
}

/* Запись */
.news_text p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* =============================
   Dropdown multi-level menu
   Scope: .dropdown_menu
   ============================= */
.dropdown_menu {
    border: 1px solid var(--color-content-border);
}

.dropdown_menu .menu,
.dropdown_menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.1;
}

/* Items with children: place toggle after link */
.dropdown_menu .menu-item-has-children {
    position: relative;
}

.l-main .dropdown_menu .widget_nav_menu .menu-item a {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.l-main .dropdown_menu .widget_nav_menu .menu-item.is-open > a {
    background: var(--color-content-bg-alt);
}

.l-main .dropdown_menu .widget_nav_menu .sub-menu .menu-item a {
    font-size: 0.85rem;
    padding-left: 1.5rem;
}

.l-main .dropdown_menu .widget_nav_menu .sub-menu .sub-menu .menu-item a {
    padding-left: 3rem;
}

.l-main .dropdown_menu .widget_nav_menu .menu-item.current-menu-item>a {
    background: unset;
    color: var(--color-content-link);
    border-bottom: 1px solid var(--color-content-border) !important;
    border-top: 1px solid var(--color-content-border) !important;
}

/* Toggle button (chevron) */
.dropdown_menu .ddm-toggle {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    margin-left: 1rem;
    margin-right: 0.25rem;
    cursor: pointer;
    vertical-align: middle;
    color: var(--color-content-text);
}

.dropdown_menu .ddm-toggle:focus-visible {
    outline: 2px solid var(--color-content-link);
    outline-offset: 2px;
}

/* Chevron icon */
.dropdown_menu .ddm-toggle::before {
    content: '';
    display: inline-block;
    width: 0.5em;
    height: 0.5em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .25s ease;
}

/* Rotate when open */
.dropdown_menu li.is-open > a .ddm-toggle::before {
    transform: rotate(45deg);
}

/* Submenu base (collapsed) */
.dropdown_menu .sub-menu {
    background: var(--color-content-bg);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform-origin: top;
    transition: max-height .3s ease, opacity .25s ease;
    will-change: max-height, opacity;
}

/* Reveal when parent opened */
.dropdown_menu li.is-open > .sub-menu {
    opacity: 1;
    max-height: 1000px; /* large enough for typical menus */
}

/* Visual nesting */
.dropdown_menu .sub-menu > li > a {
    padding-left: 1rem;
}
.dropdown_menu .sub-menu .sub-menu > li > a {
    padding-left: 1.75rem;
}

/* Optional separators and subtle borders using theme vars */
.dropdown_menu .sub-menu > li {
    border-top: 0;
}
.dropdown_menu .sub-menu > li:first-child {
    border-top: 0;
}

/* Link hovers */
.dropdown_menu a:hover,
.dropdown_menu a:focus {
    color: var(--color-content-link-hover);
}

/* Current item highlighting (uses provided palette) */
.dropdown_menu .current-menu-item > a,
.dropdown_menu .current-menu-ancestor > a,
.dropdown_menu .current-menu-parent > a {
    color: var(--color-content-primary);
}