/*
Theme Name: Ruyxd
Theme URI: https://github.com/
Author: Custom
Author URI: 
Description: Пустая тема для разработки. Используйте как основу: добавляйте файлы в папку темы и работайте с ней.
Version: 1.0.0
Tested up to: 6.4
Requires at least: 5.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: ruyxd_theme
Tags: custom-menu, featured-images, translation-ready, full-width-template, theme-options

*/

/* Базовая тема — стили добавляйте по мере разработки. */

/* Минимальная вёрстка для корректного отображения в админке и на сайте */
.site-header {
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

.site-branding {
    margin-bottom: 0.5rem;
}

.site-title {
    margin: 0;
    font-size: 1.25rem;
}

.site-title a {
    text-decoration: none;
}

.site-description {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #666;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.main-navigation a {
    text-decoration: none;
}

.main-navigation .menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .main-navigation .menu-toggle {
        display: inline-block;
    }

    .main-navigation ul {
        display: none;
    }

    .main-navigation.toggled ul {
        display: block;
    }
}

.site-main {
    padding: 1.5rem 0;
    min-height: 40vh;
}

.site-main article {
    margin-bottom: 2rem;
}

.site-main h1,
.site-main h2 {
    margin-top: 0;
}

.site-footer {
    padding: 1rem 0;
    border-top: 1px solid #ddd;
    font-size: 0.875rem;
    color: #666;
}

.site-footer a {
    color: inherit;
}

.archive-title {
    margin-bottom: 1rem;
}


/* ── Сброс списка ── */
.header-categories {
    list-style: none;
    margin: 0;
    padding: 0;
    /* остальные твои flex-стили уже есть */
}

.header-categories li {
    list-style: none;
    position: relative;
    /* якорь для выпадающего sub-menu */
}

/* ── Верхний уровень: стили как были у .header-categories__item ── */
.header-categories>li>a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    color: var(--white);
    font-family: var(--font);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.219;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.header-categories>li>a:hover {
    opacity: 0.9;
}

/* ── Стрелка через ::after для пунктов с детьми ── */
.header-categories>li.menu-item-has-children>a::after {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 23px;
    height: 7px;
    margin-left: 4px;
    background: url('/wp-content/themes/ruyxd_theme/assets/icons/icon-arrow-down.svg') center / contain no-repeat;
    filter: brightness(0) invert(1);
    transition: transform 0.25s ease;
}

/* Стрелка поворачивается при ховере */
.header-categories>li.menu-item-has-children:hover>a::after {
    transform: rotate(180deg);
}

/* ── Выпадающее меню 2-го уровня ── */
.header-categories .sub-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: calc(100% + 12px);
    /* отступ от нижнего края пункта */
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--white);
    border-radius: var(--block-radius);
    box-shadow: var(--shadow);

    /* Скрыто */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transform: translateX(-50%) translateY(-6px);
}

/* Показываем при ховере на <li> — не на <a>, чтобы не пропадало при движении к sub-menu */
.header-categories>li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Пункты 2-го уровня */
.header-categories .sub-menu a {
    display: block;
    padding: 10px 18px;
    color: var(--text-dark);
    font-size: 14px;
    font-family: var(--font);
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.header-categories .sub-menu a:hover {
    background: rgba(132, 11, 172, 0.07);
    /* --accent с прозрачностью */
    color: var(--accent);
}

/* "мостик" — невидимая зона между пунктом и дропдауном, чтобы меню не закрывалось */
.header-categories>li.menu-item-has-children::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
    /* чуть больше чем top у sub-menu */
}



/* Скрытые пункты меню (сверх лимита) */
.sidebar-menu__extra {
    display: none;
}

/* Когда список раскрыт — показываем все */
.sidebar-menu-list.is-expanded .sidebar-menu__extra {
    display: list-item;
    /* для nav-list */
}

.sidebar-professions .sidebar-menu-list.is-expanded .sidebar-menu__extra {
    display: block;
    /* для professions */
}

/* Кнопка toggle — используем уже существующий .sidebar-block__btn */
.sidebar-toggle-btn {
    cursor: pointer;
    /* текст меняется через JS, внешний вид — как у .sidebar-block__btn */
}

/* Скрытые ряды */
.sidebar-professions__row.sidebar-menu__extra {
    display: none;
}

/* Раскрытое состояние */
.sidebar-professions.is-expanded .sidebar-menu__extra {
    display: flex;
    /* __row уже flex по твоим стилям */
}

.sidebar-professions__item {
    padding: 10px 20px;
}

/* WP nav menu: сброс <ul>/<li> внутри .sidebar-nav */
.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Стили с <a> переносим и на WP-шные ссылки внутри <li> */
.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 10px 25px;
    color: var(--text-dark);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: -0.03em;
    text-decoration: none;
    border-bottom: 0.5px solid var(--border);
    transition: background 0.2s;
}

.sidebar-nav li a:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Последний пункт — убираем border */
.sidebar-nav li:last-child a {
    border-bottom: none;
    border-radius: 0 0 var(--block-radius) var(--block-radius);
}

/* STEPS TABS */

.steps-tabs {
    margin-top: 40px;
    text-align: center;
}

.steps-tabs__nav {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.steps-tabs__nav:after {
    content: '.................................................................................................................................';
    font-family: inherit;
    font-weight: 300;
    font-size: 16px;
    line-height: 1;
    color: #7c7c7c;
    display: block;
    overflow: hidden;
    width: calc(100% - 36px);
    position: absolute;
    z-index: -1;
    left: 18px;
    top: calc(50% - 12px);
}

.steps-tabs__btn {
    position: relative;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    padding: 15px 30px;
    background: #fff;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.steps-tabs__btn span {
    font-weight: 700;
    margin-left: 4px;
}

.steps-tabs__btn:hover {
    background: var(--accent);
    color: var(--white);
}

.steps-tabs__btn.active {
    background: var(--accent);
    color: var(--white);
}

.steps-tabs__content {
    max-width: 700px;
    margin: auto;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
}

.steps-tabs__panel {
    display: none;
}

.steps-tabs__panel.active {
    display: block;
}

.steps__cta {
    margin-top: 40px;
    text-align: center;
}

/* ── Catalog Section ────────────────────────────────────────────────────── */

.catalog-section {
    margin: 40px 0;
}

.catalog-group {
    margin-bottom: 24px;
}

.catalog-group__letter {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}

.catalog-group__list {
    columns: 2;
    column-gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.catalog-group__item {
    font-size: 18px;
    line-height: 2;
    break-inside: avoid;
}

.catalog-group__link {
    text-decoration: none;
    color: inherit;
}

.catalog-group__link:hover {
    text-decoration: underline;
}

.price_diplom{max-width: 500px;justify-content: center;}
.home .diploma-year-card__actions{margin-top: 0;margin-bottom: 15px;}
.home .diploma-year-card__btn{width: 100%;    margin: 0px 5px;}
.diploma-year-card__btn{text-align: center;}
.diploma-year-card__actions{min-width: 150px;}
.page-template-page-prices .diploma-year-card__actions{flex-direction: column;    width: 150px;}
#faq {
    scroll-margin-top: 275px;
}

.higher-edu__desc table {
  width: 100%;
  border-collapse: collapse; /* Прибирає подвійні рамки */
  font-family: sans-serif;
}

.higher-edu__desc td {
  padding: 10px;
  border: 1px solid #ccc; /* Колір та товщина рамки */
  text-align: left;
}

.custom-category .section_prices{margin: 30px auto;}