/**
 * Стили для медицинского центра "ПрофМед"
 * Переработано под цвета логотипа: фиолетовый + красный
 */

/* ===================== ПЕРЕМЕННЫЕ ===================== */
:root {
    /* Основные цвета из логотипа */
    --primary: #3B2F7E;        /* Фиолетовый — текст лого */
    --primary-dark: #2e2463;
    --primary-light: #ede9fe;
    --accent: #E31E24;         /* Красный — крест в лого */
    --accent-dark: #b91c1c;
    --accent-light: #fee2e2;
    /* Нейтральные */
    --secondary: #54595F;
    --text: #4A4A4A;
    --text-dark: #1A1A2E;
    --white: #FFFFFF;
    --light: #f8f9fa;
    --border: #ddd;
    /* Тени */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(59,47,126,0.15);
    --radius: 8px;
}

/* ===================== ОБЩИЕ ===================== */
html {
    scroll-behavior: smooth;
}
body {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 16px;
    line-height: 1.875;
    color: var(--text-dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Скроллбар — фиолетовый */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===================== ШАПКА (site-header) ===================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-bottom: 3px solid var(--primary-light);
}

/* ----- Верхняя строка (header-top) ----- */
.header-top {
    background: var(--white);
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.header-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 48px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

/* Часы + Записаться */
.schedule-and-appointment {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Офисы */
.offices-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 1;
    white-space: nowrap;
}

/* Адреса в шапке — более выразительные */
.office-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.office-line:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59,47,126,0.15);
}

.office-separator {
    color: #ccc;
    font-size: 0.7rem;
}

.office-icon {
    color: var(--accent);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.office-address-text {
    flex-shrink: 0;
}

.office-phone-text {
    text-decoration: none;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 800;
    transition: all 0.2s ease;
}

.office-phone-text:hover {
    color: var(--primary);
    transform: scale(1.05);
}

/* Кнопка записаться — красная (цвет креста) */
.btn-appointment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(227,30,36,0.3);
}

.btn-appointment:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(227,30,36,0.4);
}

/* Гамбургер */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger-line {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Анимация гамбургера */
.hamburger.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ----- Нижняя строка (main-nav) ----- */
.main-nav {
    background: var(--white);
    padding: 0;
}

.nav-links {
    display: flex;
    gap: 4px;
    justify-content: center;
}

/* Навигация — более выразительная */
.nav-link {
    display: inline-block;
    padding: 14px 24px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--primary);
    font-weight: 800;
}

.nav-link.active::after {
    width: 80%;
}

/* ===== Мобильное меню ===== */
.mobile-menu {
    background: var(--white);
    border-top: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: absolute;
    left: 0;
    right: 0;
    z-index: 999;
}

.mobile-menu:not(.hidden) { display: block; }

.mobile-menu-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.mobile-office {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
}

.mobile-link {
    display: block;
    padding: 10px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.3s ease;
}

.mobile-link:hover, .mobile-link.active {
    color: var(--primary);
}

.mobile-appt-btn {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 12px 20px;
    justify-content: center;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .offices-wrapper { gap: 0.5rem; }
    .office-address-text { display: none; }
    .header-top__inner { flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .offices-wrapper { display: none; }
    .btn-appointment:not(.mobile-appt-btn) { display: none; }
    .hamburger { display: flex; }
    .nav-links { display: none; }
    .mobile-office { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 480px) {
    .logo { font-size: 1.3rem; }
    .logo-icon { font-size: 1.2rem; }
    .header-top { padding: 8px 0; }
}

/* ===== Иконка графика работы ===== */
.schedule-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent);
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
}
.schedule-icon:hover {
    color: var(--primary);
    transform: scale(1.2);
}

/* ===== Попап расписания ===== */
.schedule-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.schedule-popup:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.schedule-popup-inner {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}
.schedule-popup:not(.hidden) .schedule-popup-inner {
    transform: translateY(0);
}

.schedule-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #999;
    transition: color 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.schedule-close:hover {
    color: #333;
    background: #f0f0f0;
}

.schedule-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.schedule-title i {
    color: var(--accent);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.schedule-item:last-child {
    border-bottom: none;
}
.schedule-office {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}
.schedule-hours {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ===== СТРАНИЦА КОНТАКТОВ ===== */
.page-contacts {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--accent-light) 100%);
}

.contacts-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contacts-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.contacts-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.contacts-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--primary);
}

.contacts-card--email .contacts-card__icon {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--primary-light) 100%);
    color: var(--accent);
}

.contacts-card__content {
    flex: 1;
    min-width: 0;
}

.contacts-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 10px;
}

.contacts-card__row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text);
}

.contacts-card__icon-sm {
    color: var(--accent);
    width: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.contacts-card__link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}
.contacts-card__link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.contacts-card__row a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}
.contacts-card__row a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.contacts-card__content > a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.contacts-card__content > a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Карты (две отдельные) */
.contacts-maps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.map-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}

.map-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px;
}

.map-card__iframe {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.map-card__iframe iframe {
    width: 100%;
    height: 400px;
    display: block;
    border: none;
}

.map-card__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}
.map-card__nav-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Адаптив для карт */
@media (max-width: 1023px) {
    .map-card__iframe iframe {
        height: 350px;
    }
}

@media (max-width: 767px) {
    .map-card__iframe iframe {
        height: 280px;
    }
    .contacts-maps {
        gap: 20px;
    }
    .map-card {
        padding: 12px;
    }
}

/* Форма обратной связи */
.contacts-feedback {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.contacts-feedback__msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.contacts-feedback__msg--ok {
    background: rgba(59,47,126,0.1);
    color: var(--primary);
}
.contacts-feedback__msg--err {
    background: rgba(227,30,36,0.1);
    color: var(--accent);
}

.contacts-feedback__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contacts-feedback__row {
    display: flex;
    gap: 12px;
}
.contacts-feedback__row .contacts-feedback__input {
    flex: 1;
}

.contacts-feedback__input,
.contacts-feedback__textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: Tahoma, Geneva, sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8f9fa;
}
.contacts-feedback__input:focus,
.contacts-feedback__textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,47,126,0.15);
    background: #fff;
}

.contacts-feedback__textarea {
    resize: vertical;
    min-height: 100px;
}

.contacts-feedback__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Tahoma, Geneva, sans-serif;
    box-shadow: 0 4px 12px rgba(59,47,126,0.3);
}
.contacts-feedback__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,47,126,0.4);
}

/* Адаптив для страницы контактов */
@media (max-width: 1024px) {
    .page-contacts__grid {
        grid-template-columns: 1fr !important;
    }
    .lg\:col-span-3, .lg\:col-span-2 {
        grid-column: span 1;
    }
    .contacts-map {
        position: static;
        min-height: 300px;
    }
    .contacts-map iframe {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .page-contacts {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
    .contacts-card {
        padding: 16px 20px;
    }
    .contacts-card__icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .contacts-feedback__row {
        flex-direction: column;
    }
}

/* ===== ЭЛЕМЕНТЫ САЙТА ===== */

/* Кнопки */
#appointment .bg-primary-600, #appointment button.bg-primary-600 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%) !important;
}
#appointment .bg-primary-600:hover, #appointment button.bg-primary-600:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(59,47,126,0.4) !important;
}

/* Поля форм */
input, select, textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: Tahoma, Geneva, sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,47,126,0.15);
}

/* Слайдер */
#promo { background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%); }
#promo button {
    background: var(--white);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0;
    color: var(--secondary);
    transition: all 0.3s ease;
}
#promo button:hover { background: var(--primary); color: var(--white); }
#promo .s-dot {
    width: 12px; height: 12px; border-radius: 50%; background: #ccc;
    border: none; cursor: pointer; transition: background 0.3s ease;
}
#promo .s-dot.bg-primary-600 { background: var(--accent); }

/* Врачи */
#doctors .bg-white {
    box-shadow: var(--shadow-sm); border-radius: var(--radius); overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary);
}
#doctors .bg-white:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-lg);
    border-top-color: var(--accent);
}

/* Лицензии */
#licenses .bg-gray-50 {
    background: var(--white); border-radius: var(--radius); border: 1px solid #eee;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
#licenses .bg-gray-50:hover { 
    box-shadow: var(--shadow-lg); 
    border-color: var(--accent); 
    transform: translateY(-6px);
}

/* Цвета текста */
.text-primary-600 { color: var(--primary) !important; }
a.text-primary-600:hover { color: var(--accent) !important; text-decoration: underline; }

/* Модалки */
#svc-modal, #lightbox { animation: modalIn 0.2s ease; }
@keyframes modalIn { from { opacity:0; } to { opacity:1; } }
.animate-modal { animation: modalIn 0.2s ease; }

/* Сообщения формы */
#appt-ok { background: rgba(59,47,126,0.1) !important; border:1px solid var(--primary) !important; color: var(--primary) !important; }
#appt-err { background: rgba(227,30,36,0.1) !important; border:1px solid var(--accent) !important; color: var(--accent) !important; }

/* Футер */
footer { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important; color: #ccc; }
footer a { color: #ccc; transition: color 0.3s ease; }
footer a:hover { color: var(--accent-light); }
footer h4 { color: var(--white); }

/* Печать */
@media print {
    .site-header, footer { display: none; }
    body { background: white; color: black; }
}

/* ===== FOOTER (Tailwind) ===== */
.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}
.footer h4 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.footer a {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s ease;
}
.footer a:hover {
    color: var(--accent-light);
}
.footer p, .footer li {
    color: rgba(255,255,255,0.7);
}

/* ===== ГАЛЕРЕЯ ЛИЦЕНЗИЙ ===== */
.license-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
}
.license-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

/* ===== LIGHTBOX ===== */
#license-lightbox {
    display: none;
}
#license-lightbox:not(.hidden) {
    display: flex;
}
#license-lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* ===== СТРАНИЦА УСЛУГ: КАРТОЧКИ УСЛУГ ===== */
/* Постоянная тень для карточек услуг */
.service-card-hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.service-card-hover:hover {
    box-shadow: 0 10px 40px rgba(59,47,126,0.15);
}

/* ===== СТРАНИЦА УСЛУГ: ГРУППЫ УСЛУГ ===== */

/* Секция групп */
.groups-section {
    margin-bottom: 3rem;
}

/* Карточка группы */
.group-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 20px;
    background: white;
    border-radius: 16px;
    border: 2px solid transparent;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    height: 100%;
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.group-card.active {
    background: #f0f0f0;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 16px rgba(59,47,126,0.15);
}

/* Иконка группы */
.group-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.group-card:hover .group-card__icon {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59,47,126,0.3);
}

.group-card.active .group-card__icon {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-dark) 100%);
    box-shadow: 0 4px 12px rgba(59,47,126,0.3);
}

/* Заголовок группы */
.group-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.group-card:hover .group-card__title {
    color: var(--primary);
}

.group-card.active .group-card__title {
    color: var(--primary);
}

/* Счётчик услуг */
.group-card__count {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    margin-top: 4px;
    line-height: 1;
    flex-shrink: 0;
}

.group-card:hover .group-card__count {
    color: var(--primary);
}

.group-card.active .group-card__count {
    color: var(--primary);
}

/* ===== СТРАНИЦА УСЛУГ: ФИЛЬТРЫ И НАВИГАЦИЯ ===== */

/* Блок фильтров */
.services-filters form {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 2px solid #e5e7eb;
}

.services-filters input[type="text"] {
    background: #f9fafb;
}
.services-filters input[type="text"]:focus {
    background: white;
}

.services-filters select {
    background: #f9fafb;
}
.services-filters select:focus {
    background: white;
}

/* Навигация категорий (при выбранной группе) */
.services-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.services-nav a {
    background: white;
    color: #54595F;
    border: 2px solid #e5e7eb;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}
.services-nav a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}
.services-nav a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(59,47,126,0.3);
}

/* Счётчик результатов */
.services-count {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Адаптив фильтров */
@media (max-width: 768px) {
    .services-filters form {
        padding: 16px;
    }
    .services-filters .flex-col {
        gap: 1rem;
    }
}

/* Кнопка «Наверх» */
.scroll-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: var(--primary, #3b2f7e);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 47, 126, 0.35);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}
.scroll-to-top:hover {
    transform: translateY(-2px);
}
.scroll-to-top.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Обязательные поля */
.required-mark {
    color: #dc2626;
    font-weight: 600;
}