/* Medical Catalog Styles - Soft Pastel Color Palette */
:root {
    /* Нежные основные цвета */
    --primary-color: #6366f1;          /* Мягкий индиго */
    --primary-light: #a5b4fc;          /* Светлый индиго */
    --primary-dark: #4f46e5;           /* Темнее индиго */
    --secondary-color: #34d399;        /* Нежный мятный */
    --secondary-light: #86efac;        /* Светлый мятный */
    --accent-color: #f59e0b;           /* Мягкий янтарный */
    --accent-light: #fcd34d;           /* Светлый янтарный */
    
    /* Нежные нейтральные */
    --text-dark: #374151;              /* Мягкий серый */
    --text-light: #9ca3af;             /* Светло-серый */
    --text-muted: #d1d5db;             /* Очень светлый серый */
    
    /* Фоновые цвета */
    --bg-light: #f8fafc;              /* Очень светлый фон */
    --bg-card: #ffffff;                /* Белый для карточек */
    --bg-hover: #f1f5f9;              /* Легкий ховер */
    
    /* Границы и тени */
    --border-color: #e2e8f0;          /* Нежные границы */
    --border-light: #f1f5f9;          /* Очень светлые границы */
    --shadow-soft: 0 4px 6px -1px rgba(99, 102, 241, 0.08);
    --shadow-gentle: 0 10px 15px -3px rgba(99, 102, 241, 0.1);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    
    /* Специальные цвета */
    --success-color: #10b981;          /* Нежный зеленый */
    --success-light: #d1fae5;          /* Очень светлый зеленый */
    --warning-color: #f59e0b;          /* Мягкий янтарный */
    --warning-light: #fef3c7;          /* Светлый янтарный фон */
    --error-color: #ef4444;            /* Мягкий красный */
    --error-light: #fee2e2;            /* Светлый красный фон */
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    --gradient-card: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.medical-catalog-wrapper {
    font-family: 'Montserrat', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* Header */
.medical-header {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.medical-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.medical-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-family: 'MontserratBold', sans-serif;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.medical-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters */
.medical-filters {
    background: var(--bg-card);
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
    border-bottom: 1px solid var(--border-light);
}

.filter-bar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.search-box {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-light);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

.date-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-filters input {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-light);
    transition: border-color 0.3s ease;
    box-shadow: var(--shadow-card);
}

.date-filters input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.btn-update {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'MontserratBold', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-update:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gentle);
}

/* Directions Info */
.directions-info {
    margin-bottom: 2rem;
    text-align: center;
}

.directions-info h2 {
    color: var(--text-dark);
    font-size: 2rem;
    font-family: 'MontserratBold', sans-serif;
    margin-bottom: 0.5rem;
}

.directions-info .count {
    color: var(--text-light);
    font-weight: normal;
    font-size: 1.1rem;
}

/* Directions Grid */
.directions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.direction-card {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid var(--border-light);
    position: relative;
}

.direction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.direction-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-gentle);
    border-color: var(--primary-light);
}

.direction-card:hover::before {
    opacity: 1;
}

/* Убираем подчёркивание для ссылки-обёртки направления */
.direction-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.direction-link:hover {
    text-decoration: none !important;
}

.direction-header {
    background: var(--gradient-card);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.direction-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.direction-title {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'MontserratBold', sans-serif;
    margin-bottom: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.direction-stats {
    display: flex;
    justify-content: space-around;
    font-size: 0.9rem;
    opacity: 0.95;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.direction-stats span {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.direction-content {
    padding: 2rem 1.5rem;
}

/* Service and Doctor Previews */
.services-preview, .doctors-preview {
    margin-bottom: 1.5rem;
}

.services-preview h4, .doctors-preview h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-family: 'MontserratBold', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.services-preview h4::before {
    content: '🏥';
    font-size: 1rem;
}

.doctors-preview h4::before {
    content: '👩‍⚕️';
    font-size: 1rem;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.service-item:hover {
    background: var(--bg-hover);
    margin: 0 -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 8px;
}

.service-item:last-child {
    border-bottom: none;
}

.service-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-dark);
    margin-right: 1rem;
    font-size: 0.9rem;
}

.service-price {
    color: var(--secondary-color);
    font-weight: 600;
    font-family: 'MontserratBold', sans-serif;
    white-space: nowrap;
    background: var(--success-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}


.doctor-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.doctor-item:hover {
    background: var(--bg-hover);
}

.doctor-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-family: 'MontserratBold', sans-serif;
    margin-right: 1rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-card);
}

.doctor-info {
    flex: 1;
}

.doctor-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.doctor-spec {
    font-size: 0.85rem;
    color: var(--text-light);
}

.view-details-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'MontserratBold', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gentle);
}

/* Loading and Error States */
.loading-indicator {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.2rem;
}

.loading-indicator::before {
    content: '⏳';
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    border: 2px dashed var(--border-color);
}

.no-results-content i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.no-results-content h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-family: 'MontserratBold', sans-serif;
    font-size: 1.5rem;
}

.btn-clear {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'MontserratBold', sans-serif;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-clear:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gentle);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.1);
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 950px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-gentle);
}

.modal-header {
    background: var(--gradient-card);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

/* Tabs */
.tab-buttons {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
    flex-wrap: wrap;
    background: var(--bg-light);
    border-radius: 12px 12px 0 0;
    padding: 0.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'MontserratBold', sans-serif;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem;
}

.tab-btn.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-card);
}

.tab-btn:hover:not(.active) {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}


/* Контейнер/карточка */
.direction-page .direction-card{
	padding:0;border-radius:16px;overflow:hidden;
	background:#fff;box-shadow:0 8px 22px rgba(0,0,0,.06)
}
.direction-page .direction-header{
	background:linear-gradient(135deg,#2c7be5 0%,#20c997 100%);
	color:#fff;text-align:center;padding:28px 20px
}
.direction-page .direction-icon{font-size:44px;opacity:.95;margin-bottom:10px}
.direction-page .direction-title{margin:0 0 10px;font-size:28px;font-weight:800;color:#fff}
.direction-page .direction-stats{display:flex;justify-content:center}
.direction-page .mc-pill{
	display:inline-block;padding:8px 14px;border-radius:999px;font-size:14px
}
.direction-page .mc-pill--glass{
	background:rgba(255,255,255,.22);color:#fff;backdrop-filter:saturate(180%) blur(6px)
}
.direction-page .direction-content{padding:20px}

/* Хлебные крошки */
.direction-page .mc-breadcrumbs{margin:6px 0 14px}
.direction-page .mc-back{color:#1877f2;text-decoration:none}
.direction-page .mc-back:hover{text-decoration:underline}

/* Разделы/заголовки */
.direction-page .mc-section{margin:10px 0 6px}
.direction-page .mc-section-title{
	font-size:18px;margin:18px 0 10px;display:flex;align-items:center;gap:8px
}
.direction-page .mc-emoji{font-size:18px}

/* Списки и строки */
.direction-page .mc-list{list-style:none;margin:0;padding:0}
.direction-page .mc-row{
	display:flex;justify-content:space-between;align-items:center;
	gap:12px;padding:12px 0;border-bottom:1px solid #eef1f5
}
.direction-page .mc-row:last-child{border-bottom:none}
.direction-page .mc-row-left{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.direction-page .mc-row-right{display:flex;align-items:center;gap:8px}
.direction-page .mc-dot{opacity:.5}

/* Подстроки-описания */
.direction-page .mc-sub{padding:6px 0 14px;border-bottom:1px solid #eef1f5}
.direction-page .mc-sub:last-child{border-bottom:none}
.direction-page .mc-muted{color:#6b7280}

/* Бейдж цены */
.direction-page .mc-price-pill{
	background:#dff8ee;color:#17a673;border-radius:999px;
	padding:6px 10px;font-weight:600;font-size:14px;white-space:nowrap
}

/* Врачи */
.direction-page .doctors-list .mc-row-left .doctor-name{font-weight:600}
.direction-page .doctors-list .mc-row-left .doctor-spec{opacity:.75}

/* Слоты */
.direction-page .calendar-list .mc-row-left{gap:10px}
.direction-page .calendar-list .slot-time{
	font-weight:600;color:#111;background:#f3f6fb;border-radius:6px;padding:4px 8px
}

/* Адаптив */
@media(max-width:640px){
  .direction-page .direction-header{padding:22px 14px}
  .direction-page .direction-title{font-size:24px}
  .direction-page .direction-content{padding:14px}
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Service Cards */
.service-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.service-title {
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'MontserratBold', sans-serif;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.service-category {
    background: var(--gradient-secondary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'MontserratBold', sans-serif;
    box-shadow: var(--shadow-card);
}

.service-description {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
}

.service-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.detail-item i {
    color: var(--primary-color);
    width: 18px;
    font-size: 1rem;
}

.contraindications {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--error-light);
    border-left: 4px solid var(--error-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

.contraindications::before {
    content: '⚠️ ';
    font-weight: bold;
}

.book-service-btn {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'MontserratBold', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-service-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gentle);
}

/* Responsive */
@media (max-width: 768px) {
    .medical-header {
        padding: 2rem 0;
    }

    .medical-header h1 {
        font-size: 2rem;
    }

    .directions-grid {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }

    .filter-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .search-box {
        min-width: 100%;
        max-width: none;
    }

    .service-details {
        grid-template-columns: 1fr;
    }

    .service-header {
        flex-direction: column;
        align-items: start;
    }

    .tab-buttons {
        flex-direction: column;
        padding: 0;
        background: none;
    }

    .tab-btn {
        width: 100%;
        justify-content: center;
        margin: 0;
        border-radius: 0;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 16px;
    }

    .modal-body {
        padding: 1rem;
    }

    .direction-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .medical-header {
        padding: 1.5rem 0;
    }

    .medical-header h1 {
        font-size: 1.75rem;
    }

    .directions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .direction-content {
        padding: 1.5rem 1rem;
    }

    .service-card {
        padding: 1rem;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
    }
}

.service-item a:hover,
.service-name a:hover,
.service-card a:hover {
  text-decoration: none !important; /* прицельно отменяем глобальный a:hover */
}
