/* ===== SERVICES ===== */
.services-section-new {
    padding: 48px 0;
}

@media (min-width: 768px) {
    .services-section-new {
        padding: 80px 0;
    }
}

.services-grid-new {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .services-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .services-grid-new {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.service-card-new {
    border: 1.5px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.service-card-new:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.service-img-placeholder {
    height: 150px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #E67A3F;
}

@media (min-width: 768px) {
    .service-img-placeholder {
        height: 180px;
        font-size: 3rem;
    }
}

.service-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card-new:hover .service-image img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .service-image {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .service-image {
        height: 120px;
    }
}

.service-card-new h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 16px 4px;
}

.service-card-new p {
    font-size: 0.82rem;
    color: #666;
    padding: 0 16px;
    line-height: 1.5;
}

.service-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
}

.service-price {
    font-weight: 700;
    color: #E67A3F;
    font-size: 0.85rem;
}

.service-link {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.service-link:hover {
    color: #E67A3F;
}

/* ===== КАТЕГОРИИ С HOVER-МЕНЮ ===== */

.category-card {
    position: relative;
    cursor: pointer;
    overflow: visible; /* переопределяем overflow:hidden от .service-card-new,
                           иначе абсолютно позиционированный .category-dropdown обрезается */
}

.category-dropdown-wrapper {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    position: relative;
}

.category-dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.category-dropdown-trigger .service-price {
    font-size: 0.85rem;
}

.category-dropdown-trigger .dropdown-arrow {
    color: #aaa;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.category-card:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Скрытое меню */
.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    padding-top: 4px;
}

.category-card:hover .category-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content {
    background: #ffffff;
    border: 1.5px solid #f0f0f0;
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-title {
    display: block;
    padding: 10px 16px 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 4px;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #444;
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: #FFF4EC;
    color: #E67A3F;
    border-left-color: #E67A3F;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) {
    .category-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-top: 0;
        display: none;
    }

    .category-dropdown.open {
        display: block;
    }

    .category-card:hover .category-dropdown {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .category-dropdown-trigger {
        cursor: pointer;
    }

    .category-dropdown-trigger .dropdown-arrow {
        transition: transform 0.3s ease;
    }

    .category-dropdown-trigger.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    .dropdown-content {
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 4px 0 8px;
        max-height: none;
    }

    .dropdown-title {
        display: none;
    }

    .dropdown-item {
        padding: 8px 16px 8px 24px;
        font-size: 0.82rem;
        border-left: none;
        border-bottom: 1px solid #f5f5f5;
    }

    .dropdown-item:hover {
        background: transparent;
        color: #E67A3F;
        border-left: none;
    }

    .dropdown-item:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .category-dropdown-trigger .service-price {
        font-size: 0.8rem;
    }
}

/* =========================================================
   PRICE PAGE — ГЕНЕРИРУЕМАЯ СТРАНИЦА КАТЕГОРИИ
   ========================================================= */

.price-page-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2e2e2e 100%);
}

.price-page-hero-bg,
.price-page-hero-overlay {
    position: absolute;
    inset: 0;
}

.price-page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.18);
}

.price-page-hero-overlay {
    background:
        linear-gradient(105deg, rgba(244,112,10,.18) 0%, transparent 65%),
        linear-gradient(135deg, rgba(0,0,0,.1), rgba(0,0,0,.35));
}

.price-page-hero-content {
    position: relative;
    z-index: 1;
    padding: 80px 20px 90px;
}

.price-page-badge {
    display: inline-block;
    padding: 7px 13px;
    margin-bottom: 20px;
    border: 1px solid rgba(244,112,10,.35);
    border-radius: 999px;
    background: rgba(244,112,10,.15);
    color: #F4700A;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    font-weight: 700;
}

.price-page-hero h1 {
    max-width: 900px;
    margin: 0 0 18px;
    color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(42px, 7vw, 76px);
    line-height: .96;
    font-weight: 700;
}

.price-page-hero p {
    max-width: 650px;
    margin: 0;
    color: rgba(255,255,255,.62);
    font-size: 1rem;
    line-height: 1.7;
}

.price-page-content {
    padding: 72px 0 84px;
    background: #fff;
}

.price-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.price-section-header h2 {
    margin: 6px 0 0;
    color: #1a1a1a;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1;
}

.price-group {
    scroll-margin-top: 100px;
    margin-top: 30px;
    border: 1px solid #ededed;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.price-group:hover {
    border-color: #e7c3ad;
    box-shadow: 0 12px 35px rgba(0,0,0,.055);
}

.price-group-header {
    padding: 28px 30px 24px;
    background: #fafafa;
}

.price-group-label,
.price-subcategory-label {
    display: inline-block;
    color: #F4700A;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .7rem;
    font-weight: 700;
}

.price-group-header h2 {
    margin: 7px 0 7px;
    color: #1a1a1a;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1;
}

.price-group-header p {
    max-width: 760px;
    margin: 0;
    color: #777;
    line-height: 1.55;
    font-size: .9rem;
}

.price-items {
    border-top: 1px solid #ededed;
}

.price-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
    align-items: center;
    gap: 30px;
    padding: 22px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.price-item:last-child {
    border-bottom: 0;
}

.price-item-info h3 {
    margin: 0 0 6px;
    color: #1a1a1a;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 700;
}

.price-item-info p {
    max-width: 760px;
    margin: 0;
    color: #777;
    font-size: .84rem;
    line-height: 1.5;
}

.price-item-value {
    min-width: 150px;
    text-align: right;
    color: #F4700A;
    white-space: nowrap;
}

.price-number {
    font-size: .88rem;
}

.price-number strong {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
}

.price-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.price-item-value small {
    display: block;
    margin-top: 3px;
    color: #999;
    font-size: .7rem;
    white-space: normal;
}

.price-subcategory {
    scroll-margin-top: 100px;
    margin-top: 58px;
}

.price-subcategory-header {
    padding: 0 0 18px;
    border-bottom: 2px solid #1a1a1a;
}

.price-subcategory-header h2 {
    margin: 7px 0 8px;
    color: #1a1a1a;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(32px, 5vw, 46px);
    line-height: 1;
}

.price-subcategory-header p {
    max-width: 760px;
    margin: 0;
    color: #777;
    line-height: 1.6;
}

.price-group-nested {
    margin-top: 22px;
    background: #fff;
}

.price-direct-groups {
    margin-top: 36px;
}

.price-empty {
    padding: 28px;
    border: 1px dashed #ddd;
    border-radius: 12px;
    color: #999;
    text-align: center;
    font-size: .9rem;
}

.price-page-cta {
    margin-top: 0;
}

@media (max-width: 760px) {
    .price-page-hero {
        min-height: 420px;
    }

    .price-page-hero-content {
        padding: 65px 20px 70px;
    }

    .price-page-content {
        padding: 48px 0 60px;
    }

    .price-section-header {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 24px;
    }

    .price-group-header {
        padding: 22px 18px 20px;
    }

    .price-item {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 18px;
    }

    .price-item-value {
        min-width: 0;
        text-align: left;
    }

    .price-subcategory {
        margin-top: 42px;
    }
}

/* =========================================================
   ENHANCED SERVICE PAGE BORDERS / DIVIDERS
   Делает иерархию категорий, групп и услуг визуально заметнее.
   ========================================================= */

/* Карточки услуг и категорий на списковых страницах */
.service-card-new {
    border: 2px solid #d8d8d8;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
}

.service-card-new:hover {
    border-color: #c8a38c;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
}

.service-footer {
    border-top: 2px solid #dedede;
}

/* Главная рамка группы */
.price-group {
    border: 2px solid #d4d4d4;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.025);
}

.price-group:hover {
    border-color: #d7a98b;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07);
}

.price-group-header {
    border-bottom: 2px solid #d8d8d8;
}

.price-items {
    border-top: 2px solid #d8d8d8;
}

.price-item {
    border-bottom: 1.5px solid #dedede;
    transition: background-color .18s ease;
}

.price-item:hover {
    background: #fffaf6;
}

.price-item:last-child {
    border-bottom: 0;
}

/* Подкатегория должна явно отделяться от вложенных групп */
.price-subcategory {
    padding: 24px 0 8px;
}

.price-subcategory-header {
    border-bottom: 3px solid #1a1a1a;
    padding-bottom: 20px;
    position: relative;
}

.price-subcategory-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 84px;
    height: 3px;
    background: #E67A3F;
}

/* Вложенные группы — отдельный визуальный уровень */
.price-group-nested {
    border: 2px solid #dcdcdc;
    border-left: 5px solid #E67A3F;
    border-radius: 14px;
    margin-top: 24px;
}

.price-group-nested .price-group-header {
    background: #f8f8f8;
    border-bottom: 2px solid #dcdcdc;
}

/* Прямые группы категории */
.price-direct-groups {
    border-top: 2px solid #d8d8d8;
    padding-top: 12px;
}

/* Пустые состояния также имеют заметный контур */
.price-empty {
    border: 2px dashed #cfcfcf;
}

/* Разделитель перед секцией услуг */
.price-section-header {
    padding-bottom: 24px;
    border-bottom: 3px solid #1a1a1a;
    position: relative;
}

.price-section-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 96px;
    height: 3px;
    background: #E67A3F;
}

/* Услуги в отдельных страницах группы/подкатегории */
.services-list-section .service-card-new {
    border-color: #d5d5d5;
}

.services-list-section .section-header-row {
    padding-bottom: 22px;
    margin-bottom: 28px;
    border-bottom: 3px solid #1a1a1a;
    position: relative;
}

.services-list-section .section-header-row::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 90px;
    height: 3px;
    background: #E67A3F;
}

/* Breadcrumbs */
.breadcrumbs {
    padding-bottom: 14px;
    border-bottom: 1px solid #dcdcdc;
}

@media (max-width: 760px) {
    .service-card-new {
        border-width: 1.5px;
    }

    .price-group {
        border-width: 1.5px;
    }

    .price-group-nested {
        border-width: 1.5px;
        border-left-width: 4px;
    }

    .price-section-header,
    .services-list-section .section-header-row {
        padding-bottom: 18px;
    }

    .price-item {
        border-bottom-width: 1px;
    }
}

/* =========================================================
   SERVICES ACCORDION — главная страница
   Карточка категории раскрывается вниз без dropdown.
   ========================================================= */

.services-accordion-section .services-grid-new {
    align-items: start;
}

.services-accordion-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.services-accordion-card .service-card-visual,
.services-accordion-card .service-card-content,
.services-accordion-card .category-accordion,
.services-accordion-card .category-accordion-direct-link {
    flex: 0 0 auto;
}

.services-accordion-card .service-card-content {
    padding-bottom: 6px;
}

.services-accordion-card .service-card-content h3 {
    margin-bottom: 6px;
}

.services-accordion-card .service-card-content p {
    padding-bottom: 6px;
}

.category-accordion,
.category-accordion-direct-link {
    margin-top: 12px;
    border-top: 2px solid #d8d8d8;
}

.category-accordion-trigger,
.category-direct-link {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 0;
    background: #fff;
    color: #E67A3F;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.category-accordion-trigger:hover,
.category-accordion-trigger:focus-visible,
.category-direct-link:hover,
.category-direct-link:focus-visible {
    background: #fff8f3;
    color: #d86727;
    outline: none;
}

.category-accordion-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfcfcf;
    border-radius: 50%;
    color: #8f8f8f;
    transition: transform .28s ease, color .2s ease, border-color .2s ease;
}

.category-accordion-trigger[aria-expanded="true"] .category-accordion-icon {
    transform: rotate(180deg);
    color: #E67A3F;
    border-color: #E67A3F;
}

.category-accordion-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    border-top: 1px solid #e3e3e3;
    background: #fbfbfb;
    transition: grid-template-rows .34s ease, opacity .22s ease;
}

.category-accordion-panel.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
}

.category-accordion-panel[hidden] {
    display: grid;
}

.category-accordion-list {
    min-height: 0;
    overflow: hidden;
    padding: 4px 0 8px;
}

.category-accordion-item {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #e2e2e2;
    color: #303030;
    text-decoration: none;
    font-size: .86rem;
    line-height: 1.35;
    transition: background-color .18s ease, padding-left .18s ease, color .18s ease;
}

.category-accordion-item:last-child {
    border-bottom: 0;
}

.category-accordion-item:hover {
    padding-left: 20px;
    background: #fff4ec;
    color: #E67A3F;
}

.category-accordion-item i {
    flex: 0 0 auto;
    color: #a5a5a5;
    font-size: .72rem;
    transition: transform .18s ease, color .18s ease;
}

.category-accordion-item:hover i {
    transform: translateX(3px);
    color: #E67A3F;
}

.category-accordion-empty {
    padding: 14px 16px 16px;
    color: #8a8a8a;
    font-size: .82rem;
}

.category-direct-link {
    text-decoration: none;
    color: #E67A3F;
}

.category-direct-link i {
    color: #9a9a9a;
    transition: transform .18s ease, color .18s ease;
}

.category-direct-link:hover i {
    transform: translateX(3px);
    color: #E67A3F;
}

@media (max-width: 767px) {
    .category-accordion,
    .category-accordion-direct-link {
        margin-top: 10px;
    }

    .category-accordion-trigger,
    .category-direct-link {
        min-height: 50px;
        padding: 12px 14px;
        font-size: .84rem;
    }

    .category-accordion-item {
        min-height: 44px;
        padding: 10px 14px;
    }

    .category-accordion-item:hover {
        padding-left: 16px;
    }

}


/* =========================================================
   SERVICE CARDS / VISUAL SEPARATORS — FINAL
   ========================================================= */

/* Более заметные разделительные линии между услугами */
.price-items {
    border-top: 2px solid #cfcfcf;
}

.price-item {
    border-bottom: 2px solid #d2d2d2;
}

.price-item:last-child {
    border-bottom: 0;
}

/* Карточки услуг: одинаковый размер независимо от наличия описания */
.services-list-section .services-grid-new {
    align-items: stretch;
}

.services-list-section .service-card-new {
    height: 100%;
    min-height: 470px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.services-list-section .service-card-new .service-image,
.services-list-section .service-card-new .service-img-placeholder {
    flex: 0 0 180px;
}

.services-list-section .service-card-new h3 {
    min-height: 52px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.services-list-section .service-card-new > p {
    min-height: 50px;
    box-sizing: border-box;
}

.services-list-section .service-card-new .service-features {
    flex: 0 0 auto;
}

.services-list-section .service-card-new .service-footer {
    margin-top: auto;
    border-top: 2px solid #d0d0d0;
}

/* На страницах с карточками услуга всегда занимает всю высоту строки */
.services-list-section .services-grid-new > .service-card-new {
    align-self: stretch;
}

@media (max-width: 767px) {
    .services-list-section .service-card-new {
        min-height: 420px;
    }

    .services-list-section .service-card-new .service-image,
    .services-list-section .service-card-new .service-img-placeholder {
        flex-basis: 140px;
    }

    .services-list-section .service-card-new h3 {
        min-height: 46px;
    }

    .services-list-section .service-card-new > p {
        min-height: 46px;
    }

    .price-item {
        border-bottom-width: 2px;
    }
}


/* =========================================================
   MOBILE / TABLET CATEGORY CAROUSEL
   One category per view + native scroll snap.
   Desktop remains the existing grid.
   ========================================================= */
@media (max-width: 1023px) {
    .services-accordion-section .services-grid-new {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        overflow-anchor: none;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        padding: 2px 0 10px;
    }

    .services-accordion-section .services-grid-new::-webkit-scrollbar {
        display: none;
    }

    .services-accordion-section .services-grid-new .services-accordion-card {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    /* Dots sit in normal flow, directly below the carousel. */
    .services-carousel-dots {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 22px;
        margin-top: 14px;
    }

    .services-carousel-dots[hidden] {
        display: none;
    }

    .services-carousel-dot {
        appearance: none;
        width: 7px;
        height: 7px;
        flex: 0 0 7px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #d5d5d5;
        cursor: pointer;
        transition:
            width .25s ease,
            height .25s ease,
            transform .25s ease,
            background-color .25s ease,
            box-shadow .25s ease;
    }

    .services-carousel-dot:hover {
        transform: scale(1.2);
        background: #bdbdbd;
    }

    .services-carousel-dot.is-active {
        width: 10px;
        height: 10px;
        flex-basis: 10px;
        background: #E67A3F;
        box-shadow: 0 0 0 4px rgba(230, 122, 63, .12);
    }

    .services-carousel-dot:focus-visible {
        outline: 2px solid #E67A3F;
        outline-offset: 4px;
    }
}

@media (min-width: 1024px) {
    .services-carousel-dots {
        display: none;
    }
}
