/* ==========================================================================
   Pixi.kz — основные стили

   1. Базовые стили
   2. Сетка
   3. Шапка
   4. Страницы-каталоги: карточки категорий, SEO-блоки
   5. Подвал
   6. Текстовые страницы и видео
   7. Каталог специалистов (страницы категорий)
   8. Анкета специалиста
   ========================================================================== */


/* 1. Базовые стили
   ========================================================================== */

/* Шрифт Nunito Sans (лицензия OFL) — один файл на все начертания 400–700 */
@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/nunito-sans-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/nunito-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

/* Колонка «шапка — контент — подвал»: подвал прижат к низу даже на короткой странице */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: #fff;
    color: #272c30;
    font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 20px;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
p, ul, ol {
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

img {
    border: 0;
    max-width: 100%;
}

a {
    color: #62707c;
    text-decoration: none;
    transition: color .07s ease-in-out;
}

a:hover {
    color: #272c30;
}

.icon {
    display: inline-block;
    width: .875em;
    height: 1em;
    vertical-align: -.125em;
}

@media (max-width: 1000px) {
    body { font-size: 17px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
}


/* 2. Сетка
   ========================================================================== */

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.page {
    flex: 1 0 auto;
    padding: 30px 0 60px;
}


/* 3. Шапка
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    color: #fff;
    transition: box-shadow .25s ease;
}

/* Тень, когда страница прокручена (класс ставит main.js) */
.site-header.is-scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.site-header a {
    color: #fff;
}

/* --- Верхняя строка с контактами --- */

.topbar {
    background: #000;
    font-size: 80%;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 0;
}

.topbar__logo {
    display: none;
}

.topbar__contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.topbar__text {
    margin-right: .3em;
}

.topbar__phone {
    margin-right: .8em;
}

.topbar__icon + .topbar__icon {
    margin-left: .6em;
}

.topbar a:hover {
    opacity: .75;
}

/* --- Логотип и меню --- */

.masthead {
    background: #1d2327;
}

.masthead__inner {
    display: flex;
    align-items: flex-start;
    padding: 30px 0;
}

.logo {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 40px;
}

.logo img {
    display: block;
    width: auto;
    height: 40px;
}

.logo__tagline {
    margin-top: 3px;
    padding-left: 2px;
    font-size: 12px;
}

.main-nav {
    flex: 1;
    min-width: 0;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

/* min-width чуть больше 1/7 ширины меню — в ряд не влезет больше 6 кнопок */
.main-nav li {
    flex: 1 1 auto;
    min-width: calc((100% - 60px) / 7 + 1px);
}

/* Невидимый «распорщик» в конце: забирает свободное место в последнем ряду,
   чтобы одна-две кнопки там не растягивались на всю ширину */
.main-nav ul::after {
    content: "";
    flex: 999 1 0;
    margin-left: -10px;
}

.main-nav a {
    display: block;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .3px;
    text-align: center;
    white-space: nowrap;
    transition: background-color .2s, border-color .2s;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    border-color: #fff;
    background: rgba(255, 255, 255, .1);
}

.main-nav a:hover {
    text-decoration: underline;
}

/* Широкий экран: ровно 6 кнопок в ряд, столбцы по ширине самой длинной кнопки.
   Если добавите в меню длинный пункт — проверьте, что меню не вылезает вправо. */
@media (min-width: 1200px) {
    .main-nav ul {
        display: grid;
        grid-template-columns: repeat(6, auto);
        gap: 10px 8px;
    }

    .main-nav ul::after {
        content: none;
    }
}

/* --- Телефон и планшет до 782px --- */

@media (max-width: 782px) {

    /* На телефоне шапка не липкая — меню занимает много места */
    .site-header,
    .site-header.is-scrolled {
        position: static;
        box-shadow: none;
    }

    .topbar {
        font-size: 90%;
    }

    .topbar__inner {
        width: 100%;
        padding: 10px 12px;
    }

    .topbar__logo {
        display: flex;
        flex: 0 0 44px;
        flex-direction: column;
        align-items: center;
        margin-right: 8px;
        font-size: 9px;
        line-height: 1.1;
        text-align: center;
    }

    .topbar__logo span {
        color: #adadad;
    }

    .topbar__logo img {
        display: block;
        width: 44px;
        height: auto;
        margin: 4px 0 8px;
    }

    .topbar__contacts {
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    .topbar__text {
        flex-basis: 100%;
        margin-right: 0;
    }

    .masthead {
        background: #111;
    }

    .masthead__inner {
        width: 100%;
        padding: 20px 4px 14px;
    }

    .logo {
        display: none;
    }

    .main-nav ul {
        justify-content: center;
        gap: 12px 4px;
    }

    .main-nav ul::after {
        content: none;
    }

    .main-nav li {
        flex: 0 0 auto;
        min-width: 0;
    }

    .main-nav a {
        padding: 10px 9px;
        border-radius: 8px;
        font-size: 12px;
    }
}


/* 4. Страницы-каталоги: карточки категорий, SEO-блоки
   ========================================================================== */

.intro {
    margin-bottom: 30px;
}

/* Если под заголовком нет вводного текста — тот же отступ до карточек */
h1 + .categories {
    margin-top: 30px;
}

/* --- Карточки категорий: 3 или 4 в ряд (inc/parts/category-cards.php) --- */

.categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 24px;
    margin-bottom: 60px;
    list-style: none;
}

.categories--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px 20px;
}

.category-card {
    display: block;
    color: #000;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
}

.category-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #eee;
    transition: opacity .4s ease-out;
}

.category-card span {
    display: block;
    padding-top: 10px;
}

.category-card:hover {
    color: #000;
}

.category-card:hover img {
    opacity: .75;
}

.category-card:hover span {
    text-decoration: underline;
}

/* --- SEO-блоки --- */

.seo-blocks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.seo-block {
    position: relative;
    overflow: hidden; /* чтобы чёрная полоса не вылезала за скруглённые углы */
    padding: 18px 18px 18px 46px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

/* Чёрная полоса сверху */
.seo-block::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #000;
}

/* Точка слева от заголовка */
.seo-block::after {
    content: "";
    position: absolute;
    top: 24px;
    left: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #000;
}

.seo-block h2 {
    margin-bottom: 6px;
    color: #000;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: .2px;
}

.seo-block p {
    color: #333;
    font-size: 14px;
    line-height: 1.55;
}

@media (hover: hover) {
    .seo-block:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
    }
}

/* --- Почему Pixi.kz --- */

.trust {
    padding: 24px 28px;
    background: #f5f5f5;
    border-radius: 14px;
}

.trust h2 {
    margin-bottom: 12px;
    font-size: 20px;
}

.trust ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
    list-style: none;
}

.trust li {
    position: relative;
    padding-left: 28px;
    font-size: 16px;
}

.trust li::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    color: #000;
    font-weight: 700;
}

/* --- Планшет --- */

@media (max-width: 1000px) {
    .categories--4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .seo-blocks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- Телефон --- */

@media (max-width: 782px) {
    .page {
        padding-top: 20px;
    }

    .categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 16px;
    }

    /* Нечётная последняя карточка — по центру, а не прилипает к левому краю */
    .categories li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - 8px);
    }

    .seo-blocks {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .seo-block {
        padding: 16px 14px 16px 44px;
        border-radius: 12px;
    }

    .seo-block::after {
        top: 22px;
    }

    .seo-block h2 {
        font-size: 16px;
    }

    .seo-block p {
        font-size: 13px;
    }

    .trust {
        padding: 20px;
    }

    .trust ul {
        grid-template-columns: 1fr;
    }
}


/* 5. Подвал
   ========================================================================== */

.site-footer {
    padding: 30px 0;
    background: #f9f9f9;
    color: #62707c;
    font-size: 90%;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 30px;
}

.site-footer__contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 24px;
}

.site-footer__social {
    display: flex;
    gap: 14px;
    font-size: 120%;
}

@media (max-width: 782px) {
    .site-footer__inner,
    .site-footer__contacts {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* 6. Текстовые страницы и видео
   ========================================================================== */

.container--narrow {
    max-width: 720px;
}

.prose h1 {
    margin-bottom: 20px;
}

.prose h2 {
    margin: 1.4em 0 .6em;
    font-size: 1.4em;
}

.prose p {
    margin-bottom: 1.2em;
}

.prose p a {
    color: #5a3fd6;
    box-shadow: inset 0 -1px 0 #5a3fd6;
    transition: box-shadow .3s ease;
}

.prose p a:hover {
    color: #5a3fd6;
    box-shadow: inset 0 -2px 0 #5a3fd6;
}

/* --- Видео YouTube: сначала превью, плеер грузится по клику (main.js) --- */

.videos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.video {
    margin: 0;
}

.video__player {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.video__player a,
.video__player img,
.video__player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video__player img {
    object-fit: cover;
    transition: opacity .2s;
}

.video__player a:hover img {
    opacity: .85;
}

/* Красная кнопка Play — как у плеера YouTube */
.video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 68px;
    height: 48px;
    margin: -24px 0 0 -34px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>') center / contain no-repeat;
    transition: transform .2s;
}

.video__player a:hover .video__play {
    transform: scale(1.1);
}

/* Вертикальные YouTube Shorts: 4 в ряд, формат 9:16 */
.videos--shorts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.videos--shorts .video__player {
    aspect-ratio: 9 / 16;
}

.video figcaption {
    margin-top: 8px;
    color: #62707c;
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .videos {
        grid-template-columns: 1fr;
    }

    .videos--shorts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* 7. Каталог специалистов (страницы категорий)
   ========================================================================== */

.category-title {
    margin-bottom: 30px;
    font-size: 1.95em;
}

/* --- Сортировка --- */

.sort-form {
    margin-bottom: 20px;
    font-size: 16px;
}

.sort-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.sort-form select {
    width: 250px;
    max-width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    background: #fff;
    color: #62707c;
    font: inherit;
}

/* --- Карточки: 2 в ряд --- */

.specialists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.specialist-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0 32px;
    align-content: start;
    padding: 24px 25px;
    background: #f5f5f5;
}

/* Круглый аватар (серый круг, если фото нет) */
.specialist-card__avatar {
    display: block;
    width: 96px;
    height: 96px;
    overflow: hidden;
    border-radius: 50%;
    background: #e4e4e4;
}

.specialist-card__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.specialist-card__info {
    font-size: 17px;
}

.rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border-radius: 3px;
    background: linear-gradient(#13aa19, #00c812);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.rating__icon {
    width: 12px;
    height: 12px;
}

.specialist-card__name {
    margin: 4px 0 6px;
    font-size: 18px;
    line-height: 1.3;
}

.specialist-card__name a {
    color: #000;
}

.specialist-card__name a:hover {
    color: #c61616;
}

.specialist-card__price {
    margin-bottom: 12px;
    color: #000;
}

.specialist-card__price a {
    color: #000;
}

.specialist-card__price a:hover {
    color: #c61616;
}

.button-small {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    background: #e4e4e4;
    color: #000;
    font-size: 14px;
}

.button-small:hover {
    background: #272727;
    color: #fff;
}

/* Три превью-фото во всю ширину карточки */
.specialist-card__previews {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 20px;
}

.specialist-card__previews img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    background: #e4e4e4;
    transition: opacity .2s;
}

.specialist-card__previews a:hover img {
    opacity: .85;
}

@media (max-width: 782px) {
    .specialists {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .specialist-card {
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 0 20px;
        padding: 20px;
    }

    .specialist-card__avatar {
        width: 70px;
        height: 70px;
    }

    .specialist-card__previews {
        gap: 12px;
    }
}


/* 8. Анкета специалиста
   ========================================================================== */

.breadcrumbs {
    margin-bottom: 50px;
    color: #272c30;
    font-size: 30px;
    line-height: 1.3;
}

.breadcrumbs a {
    color: #62707c;
}

.breadcrumbs a:hover {
    color: #272c30;
}

.breadcrumbs__sep {
    margin: 0 .15em;
}

/* --- Шапка анкеты: аватар + контакты --- */

.profile__head {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 40px;
}

.profile__avatar {
    flex: 0 0 170px;
    width: 170px;
    height: 170px;
    overflow: hidden;
    border-radius: 50%;
    background: #e4e4e4;
}

.profile__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile__info {
    font-size: 17px;
}

.profile__info p {
    margin-bottom: 4px;
}

.profile__name {
    margin-bottom: 8px;
    font-size: 22px;
}

.profile__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile__icon {
    flex: 0 0 auto;
    width: 23px;
    height: auto;
}

.profile__info .rating {
    margin-bottom: 6px;
}

.profile__info a {
    color: #000;
}

.profile__info a:hover {
    color: #c61616;
}

/* Телефон и Instagram скрыты до нажатия «показать…» (main.js) */
.revealable .show-on-reveal,
.revealable.revealed .hide-on-reveal {
    display: none;
}

.revealable.revealed .show-on-reveal {
    display: inline;
}

.reveal-activator {
    padding: 0;
    border: 0;
    background: none;
    color: #7e7e7e;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.reveal-activator:hover {
    color: #000;
    text-decoration: none;
}

/* --- Текст анкеты (блоки редактора WordPress) --- */

.entry-content p {
    margin-bottom: 1em;
}

.entry-content p a,
.entry-content li a {
    color: #5a3fd6;
    box-shadow: inset 0 -1px 0 #5a3fd6;
}

.entry-content p a:hover,
.entry-content li a:hover {
    color: #5a3fd6;
    box-shadow: inset 0 -2px 0 #5a3fd6;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 1em 1.4em;
}

.entry-content h2,
.entry-content h3 {
    margin: 1.2em 0 .5em;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

.entry-content iframe {
    max-width: 100%;
}

.entry-content pre {
    margin-bottom: 1em;
    font-family: inherit;
    white-space: pre-wrap;
}

.entry-content figure {
    margin: 0 0 1em;
}

.marginB-40 {
    margin-bottom: 40px;
}

/* Кнопки (WhatsApp, «Связаться», «Забронировать») */
.wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
    margin-bottom: 24px;
}

.wp-block-button__link {
    display: inline-block;
    width: 100%;
    padding: calc(.667em + 2px) calc(1.333em + 2px);
    border-radius: 9999px;
    background: #32373c;
    color: #fff;
    font-size: 1.125em;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}

.wp-block-button__link:hover {
    color: #fff;
    opacity: .9;
}

.wp-block-button__width-25 { width: calc(25% - .5em); }
.wp-block-button__width-50 { width: calc(50% - .5em); }
.wp-block-button__width-75 { width: calc(75% - .5em); }
.wp-block-button__width-100 { width: 100%; }

/* Колонки: на телефоне — друг под другом */
.wp-block-columns {
    display: flex;
    gap: 2em;
    margin-bottom: 1.75em;
}

.wp-block-column {
    flex: 1 1 0;
    min-width: 0;
}

/* Размеры шрифта и цвета из редактора WordPress */
.has-small-font-size { font-size: 13px !important; }
.has-normal-font-size { font-size: 16px !important; }
.has-medium-font-size { font-size: 20px !important; }
.has-large-font-size { font-size: 36px !important; }
.has-x-large-font-size { font-size: 42px !important; }

.has-white-color { color: #fff !important; }
.has-black-color { color: #000 !important; }
.has-vivid-green-cyan-color { color: #00d084 !important; }
.has-vivid-red-color { color: #cf2e2e !important; }
.has-white-background-color { background-color: #fff !important; }
.has-black-background-color { background-color: #000 !important; }
.has-vivid-green-cyan-background-color { background-color: #00d084 !important; }
.has-vivid-red-background-color { background-color: #cf2e2e !important; }

.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }

/* «О специалисте»: текст из админки или собранный автоматически */
.profile-about {
    max-width: 820px;
    margin: 0 0 30px;
}

.profile-about h2 {
    margin: 0 0 .4em;
    font-size: 22px;
}

.profile-about p {
    margin: 0 0 .7em;
    line-height: 1.6;
}

/* Похожие специалисты — внизу анкеты */
.similar {
    margin: 60px 0 20px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.similar h2 {
    margin: 0 0 24px;
    font-size: 24px;
}

.similar__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.similar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px;
    background: #f4f4f4;
    color: #000;
    text-align: center;
    text-decoration: none;
    transition: background .2s;
}

.similar__item:hover {
    background: #ececec;
}

.similar__item img,
.similar__noavatar {
    width: 120px;
    height: 120px;
    margin-bottom: 6px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e2e2;
}

.similar__name {
    font-weight: 700;
    line-height: 1.3;
}

.similar__price {
    color: #62707c;
    font-size: 14px;
}

.similar__more {
    margin: 20px 0 0;
}

@media (max-width: 782px) {
    .similar__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .similar__item img,
    .similar__noavatar {
        width: 90px;
        height: 90px;
    }
}

/* «Другие направления» специалиста: фото работы, направление, короткое описание, цена */
.similar__item--direction {
    align-items: stretch;
    padding: 0 0 16px;
    text-align: left;
}

.similar__item--direction img,
.similar__item--direction .similar__noimage {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0 0 10px;
    border-radius: 0;
    object-fit: cover;
    background: #e2e2e2;
}

.similar__item--direction .similar__name,
.similar__item--direction .similar__desc,
.similar__item--direction .similar__price,
.similar__item--direction .similar__go {
    padding: 0 14px;
}

.similar__desc {
    color: #444;
    font-size: 14px;
    line-height: 1.45;
}

.similar__go {
    margin-top: auto;
    padding-top: 6px;
    color: #13aa19;
    font-size: 14px;
    font-weight: 600;
}

/* Текст категории под карточками: описание, «Как выбрать», «Частые вопросы» */
.category-text {
    max-width: 860px;
    margin: 60px 0 20px;
    line-height: 1.65;
}

.category-text h2 {
    margin: 0 0 .6em;
    font-size: 26px;
}

.category-text h3 {
    margin: 1.4em 0 .5em;
    font-size: 19px;
}

.category-text p {
    margin: 0 0 .9em;
}

.category-text ul {
    margin: 0 0 1em 1.3em;
    padding: 0;
}

.category-text li {
    margin-bottom: .4em;
}

/* Серый блок «В цену входит / Не входит» */
.description {
    padding: 40px 50px;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.description-2 {
    margin-bottom: 30px;
    padding: 30px 50px 25px 30px;
    background: #f2f2f2;
}

.description ul {
    margin-bottom: 12px;
}

/* Свёрнутая часть текста, «Подробнее» раскрывает (main.js) */
.content_block {
    position: relative;
    overflow: hidden;
}

.content_block.hide {
    max-height: 170px;
}

/* Плавное затухание обрезанного текста (фон — как у серого блока) */
.content_block.hide::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 50px;
    background: linear-gradient(rgba(242, 242, 242, 0), #f2f2f2);
}

.content_toggle {
    color: #62707c;
    text-decoration: underline;
}

/* --- Видео в тексте анкеты --- */

.entry-content .video__player {
    margin-bottom: 1em;
}

.video__player--vertical {
    aspect-ratio: 9 / 16;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.video__player--4-3 { aspect-ratio: 4 / 3; }
.video__player--21-9 { aspect-ratio: 21 / 9; }
.video__player--1-1 { aspect-ratio: 1; }

/* --- Галерея портфолио --- */

.gallery {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
    gap: var(--gap, 15px);
    margin: 30px 0;
}

.gallery__item {
    display: block;
    overflow: hidden;
    background: #eee;
}

.gallery__item img {
    display: block;
    width: 100%;
    transition: transform .3s ease, opacity .3s ease;
}

.gallery--tiles .gallery__item img {
    height: auto;
    aspect-ratio: var(--ratio, 1 / 1);
    object-fit: cover;
}

a.gallery__item:hover img {
    transform: scale(1.03);
}

/* «Кирпичики»: фото в своих пропорциях */
.gallery--masonry {
    display: block;
    column-count: var(--columns, 3);
    column-gap: var(--gap, 15px);
}

.gallery--masonry .gallery__item {
    margin-bottom: var(--gap, 15px);
    break-inside: avoid;
}

.gallery--masonry .gallery__item img {
    height: auto;
}

/* «Элементов на странице»: остальные фото — по кнопке «Показать ещё» (main.js) */
.gallery__item.is-more {
    display: none;
}

.gallery-more {
    margin: -10px 0 30px;
    text-align: center;
}

.gallery-more__btn {
    padding: 12px 34px;
    border: 1px solid #272c30;
    border-radius: 30px;
    background: #fff;
    color: #272c30;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.gallery-more__btn:hover {
    background: #272c30;
    color: #fff;
}

/* --- Вкладки (студии): Адрес / Подробнее / Залы --- */

.tabs {
    margin: 20px 0 30px;
}

.tabs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid #ddd;
}

.tabs__tab {
    margin-bottom: -1px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    background: none;
    color: #999;
    font: inherit;
    font-size: 18px;
    cursor: pointer;
}

.tabs__tab:hover {
    color: #333;
}

.tabs__tab.is-active {
    border-color: #ddd;
    background: #fff;
    color: #272c30;
}

.tabs__panel {
    padding: 20px;
    border: 1px solid #ddd;
    border-top: 0;
}

/* --- Просмотр фото во весь экран (main.js) --- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .92);
}

.lightbox[hidden] {
    display: none;
}

.lightbox__img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
}

.lightbox__btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 26px;
    line-height: 48px;
    cursor: pointer;
}

.lightbox__btn:hover {
    background: rgba(255, 255, 255, .25);
}

.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { top: 50%; left: 16px; transform: translateY(-50%); }
.lightbox__next { top: 50%; right: 16px; transform: translateY(-50%); }

.lightbox__counter {
    position: absolute;
    top: 28px;
    left: 24px;
    color: #fff;
    font-size: 14px;
}

body.lightbox-open {
    overflow: hidden;
}

/* --- Телефон --- */

@media (max-width: 782px) {
    .breadcrumbs {
        margin-bottom: 30px;
        font-size: 20px;
    }

    .profile__head {
        gap: 20px;
    }

    .profile__avatar {
        flex-basis: 110px;
        width: 110px;
        height: 110px;
    }

    .profile__info {
        font-size: 16px;
    }

    .wp-block-columns {
        flex-wrap: wrap;
    }

    .wp-block-column {
        flex-basis: 100%;
    }

    .description,
    .description-2 {
        padding: 20px;
    }

    .wp-block-button__width-75,
    .wp-block-button__width-50 {
        width: 100%;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery--masonry {
        column-count: 2;
    }
}
