/* ========= СТРАНИЦА УСЛУГ ========= */
.services-header {
    text-align: center;
    padding: 80px 0 60px;
    background: linear-gradient(135deg, rgba(42, 125, 46, 0.1) 0%, rgba(42, 125, 46, 0.05) 100%);
    margin-bottom: 40px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Карточка категории */
.category-card {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(42,125,46,0.15);
    border-color: rgba(42,125,46,0.3);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #212529;
    font-weight: 700;
}

.category-description {
    color: #5a6b5a;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.category-count {
    background: rgba(42,125,46,0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.category-services {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(42,125,46,0.1);
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(42,125,46,0.1);
}

.service-list li:last-child {
    border-bottom: none;
}

.service-name {
    flex-grow: 1;
}

.service-price {
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
    margin-left: 10px;
}

/* ========= ПОПУЛЯРНЫЕ УСЛУГИ В СТЕКЛЯННОМ СТИЛЕ ========= */
.popular-services {
    margin: 60px 0;
    position: relative;
}

.popular-services .section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--g-text);
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.popular-services .section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--g-primary), var(--g-accent));
    border-radius: 3px;
}

/* Карточка популярной услуги */
.popular-services .card-lite {
    background: var(--glass-bg-strong) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--glass-border) !important;
    border-radius: 22px !important;
    box-shadow: var(--glass-shadow) !important;
    padding: 30px 25px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.popular-services .card-lite:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(15, 27, 18, 0.25) !important;
    border-color: rgba(42, 125, 46, 0.3) !important;
}

.popular-services .card-lite::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--g-primary), var(--g-accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.popular-services .card-lite:hover::before {
    transform: scaleX(1);
}

/* Иконка популярности */
.popular-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--g-primary), var(--g-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 10px 20px rgba(42, 125, 46, 0.25);
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.popular-icon i {
    font-size: 2rem;
    color: white;
}

/* Заголовок услуги */
.popular-services .card-lite .h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--g-text);
}

/* Описание услуги */
.popular-services .text-muted {
    color: var(--g-muted) !important;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Цена */
.popular-services .fw-bold.text-primary {
    font-size: 1.5rem;
    font-weight: 800 !important;
    color: var(--g-primary) !important;
    background: rgba(42, 125, 46, 0.1);
    padding: 8px 15px;
    border-radius: 50px;
    display: inline-block;
}

/* Кнопка "Подробнее" */
.popular-services .btn-outline-primary {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid var(--g-primary) !important;
    color: var(--g-primary) !important;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.popular-services .btn-outline-primary:hover {
    background: var(--g-primary) !important;
    color: white !important;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(42, 125, 46, 0.3);
}

/* Бейдж "Популярная" */
.popular-services .badge {
    background: linear-gradient(135deg, #ffc107, #ff9800) !important;
    color: white !important;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.popular-services .badge i {
    font-size: 0.9rem;
}

/* Анимация появления */
.popular-services .col-lg-4 {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.popular-services .col-lg-4:nth-child(1) { animation-delay: 0.1s; }
.popular-services .col-lg-4:nth-child(2) { animation-delay: 0.2s; }
.popular-services .col-lg-4:nth-child(3) { animation-delay: 0.3s; }
.popular-services .col-lg-4:nth-child(4) { animation-delay: 0.4s; }
.popular-services .col-lg-4:nth-child(5) { animation-delay: 0.5s; }
.popular-services .col-lg-4:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========= CTA СЕКЦИЯ ========= */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e5c21 100%);
    border-radius: 30px;
    padding: 60px 40px;
    color: white;
    text-align: center;
    margin: 60px 0;
    box-shadow: 0 20px 40px rgba(42,125,46,0.2);
}

.cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.cta-section .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 12px 40px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.cta-section .btn-primary:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.cta-section .btn-price {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 40px;
    font-weight: 700;
}

.cta-section .btn-price:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ========= ПОИСК ========= */
.search-box {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.search-box input {
    padding: 15px 50px 15px 20px;
    border-radius: 30px;
    border: 2px solid rgba(42,125,46,0.2);
    font-size: 1.1rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    width: 100%;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(42,125,46,0.15);
    outline: none;
    background: white;
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
}

.search-box button:hover {
    color: var(--primary-color);
}

/* ========= ПУСТОЕ СОСТОЯНИЕ ========= */
.empty-categories {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
    grid-column: 1 / -1;
    background: var(--glass-bg-strong);
    border-radius: 22px;
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--glass-border);
}

.empty-categories i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-categories h3 {
    color: var(--g-text);
    margin-bottom: 15px;
}

.empty-categories .btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
}

.empty-categories .btn-primary:hover {
    background: var(--g-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42,125,46,0.3);
}

/* ========= АДАПТИВНОСТЬ ========= */
@media (max-width: 768px) {
    .services-header {
        padding: 60px 0 40px;
    }

    .services-header h1 {
        font-size: 2.5rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .category-card {
        padding: 25px;
    }

    .category-icon {
        font-size: 2.5rem;
    }

    .category-title {
        font-size: 1.3rem;
    }

    /* Адаптивность для популярных услуг */
    .popular-services .card-lite {
        padding: 25px 20px;
    }

    .popular-icon {
        width: 60px;
        height: 60px;
    }

    .popular-icon i {
        font-size: 1.5rem;
    }

    .popular-services .card-lite .h4 {
        font-size: 1.2rem;
    }

    .popular-services .fw-bold.text-primary {
        font-size: 1.3rem;
        padding: 6px 12px;
    }

    .cta-section {
        padding: 40px 20px;
    }

    .cta-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .services-header {
        padding: 40px 0 30px;
    }

    .services-header h1 {
        font-size: 2rem;
    }

    .services-header .lead {
        font-size: 1rem;
    }

    .search-box input {
        padding: 12px 45px 12px 15px;
        font-size: 1rem;
    }

    .popular-services .card-lite .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }

    .popular-icon {
        margin-right: 0;
    }

    .cta-section {
        padding: 30px 15px;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-section .btn {
        width: 100%;
        margin: 5px 0;
    }

    .cta-section .d-flex {
        flex-direction: column;
    }
}

.category-card.with-bg {
        background-size: cover;
        background-position: center;
        position: relative;
        color: white;
        text-shadow: 0 2px 5px rgba(0,0,0,0.5);
        min-height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 30px 25px;
        transition: all 0.3s ease;
        border: none;
    }

.category-card.with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
    border-radius: 22px;
    z-index: 1;
}

.category-card.with-bg > * {
    position: relative;
    z-index: 2;
}

.category-card.with-bg .category-icon i,
.category-card.with-bg .category-title,
.category-card.with-bg .category-description,
.category-card.with-bg .category-count,
.category-card.with-bg .category-link {
    color: white !important;
}

.category-card.with-bg .category-count {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
}

.category-card.with-bg .category-link i {
    color: white !important;
}

.category-card.with-bg:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}