/* =====================================================
   DI DESIGN SYSTEM & UI KIT
   Стоматологическая сеть "Дианта" (Москва)
   Версия UI Kit: 1.0.2 (Релизная суперстабильная)
   
   Авторские компоненты и готовность:
   ✓ Foundation (:root, box-sizing, smooth scroll)
   ✓ Typography & Utilities (.di-content)
   ✓ Buttons (.di-btn)
   ✓ Process (Этапы лечения)
   ✓ Price (Прайс-листы)
   ⬜ FAQ (В разработке)
   ⬜ Cards (В разработке)
   ⬜ Reviews (В разработке)
   ⬜ Doctor (В разработке)
   ⬜ CTA (В разработке)
===================================================== */

:root {
    /* 1. Цветовая палитра */
    --di-primary: #0B3B5C;       /* Премиальный глубокий синий */
    --di-accent: #0284C7;        /* Акцентный технологичный голубой */
    --di-bg: #FAFCFF;            /* Мягкий фоновый оттенок всей страницы */
    --di-card-bg: #ffffff;       /* Чистый фон карточек и таблиц */
    --di-border: #E2E8F0;        /* Тонкие премиальные границы в стиле Stripe */
    --di-text: #64748B;          /* Читаемый серый цвет для описаний */
    --di-title: #1E293B;         /* Глубокий темный цвет для заголовков */
    
    /* 2. Геометрия и радиусы */
    --di-radius-lg: 24px;        /* Скругление основных карточек */
    --di-radius-md: 16px;        /* Скругление внутренних блоков и CTA */
    --di-radius-pill: 999px;     /* Округлые кнопки и вкладки-пилюли */
    --di-container-wide: 980px;  /* Основной UX-стандарт для контента и цен */
    --di-container-narrow: 820px;/* Стандарт для SEO-текстов и статей */
    --di-section-padding: 90px;  /* Системный вертикальный отступ между блоками */
    
    /* 3. Эффекты и анимации */
    --di-shadow-sm: 0 4px 18px rgba(11, 59, 92, 0.02);
    --di-shadow-md: 0 8px 24px rgba(11, 59, 92, 0.04);
    --di-transition: 0.25s ease-in-out; /* Единый плавный тайминг ховеров */
}

/* Базовая модель размеров и плавность */
html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* -----------------------------------------------------
   ГЛОБАЛЬНЫЕ КЛАССЫ ШИРИНЫ КОНТЕЙНЕРОВ (СТАНДАРТ UX)
----------------------------------------------------- */
.di-content {
    max-width: var(--di-container-narrow);
    margin: 0 auto;
}

.di-content-wide {
    max-width: var(--di-container-wide);
    margin: 0 auto;
}


/* -----------------------------------------------------
   1. DI BUTTONS (Новая унифицированная система кнопок)
----------------------------------------------------- */
.btn-catalog-wrapper {
    margin-top: 40px;
    margin-bottom: 20px;
    width: 100%;
    text-align: center; 
    display: block;     
    padding: 0;
    position: relative;
    z-index: 10;
}

/* Базовый класс кнопки UI Kit */
.di-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--di-radius-pill);
    font-size: 15px; 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    transition: var(--di-transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

/* Основная синяя кнопка */
.di-btn-primary {
    background-color: var(--di-primary);
    color: #ffffff !important;
    box-shadow: var(--di-shadow-md);
}

/* Единое правило для ховеров всех вариаций кнопок */
.di-btn-primary:hover,
.di-btn-submit:hover, 
.btn-info-custom:hover {
    background-color: var(--di-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.25);
    color: #ffffff !important;
}

/* Обеспечение совместимости со старыми классами без дублирования свойств */
.btn-info-custom, .di-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--di-primary);
    color: #ffffff !important;
    padding: 14px 36px;
    border-radius: var(--di-radius-pill);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: var(--di-transition);
    box-shadow: var(--di-shadow-md);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}


/* -----------------------------------------------------
   2. DI PRICE COMPONENT (Модуль Прайс-листа)
----------------------------------------------------- */
.di-price {
    padding: var(--di-section-padding) 0;
    background: var(--di-bg);
}

.di-price-tabs-container {
    position: relative;
    width: 100%;
    margin-bottom: 45px;
}

.di-price-tabs {
    display: flex;
    flex-wrap: nowrap; 
    justify-content: flex-start;
    gap: 12px;
    padding: 4px 24px 14px 0;
    margin: 0;
    list-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.di-price-tabs::-webkit-scrollbar { display: none; }
.di-price-tabs { -ms-overflow-style: none; scrollbar-width: none; }

.di-price-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border-radius: var(--di-radius-pill);
    border: 1px solid #D8E4EE;
    background: var(--di-card-bg);
    color: var(--di-primary);
    font-size: 16px;
    font-weight: 600;
    transition: var(--di-transition);
    white-space: nowrap;
}

.di-price-tabs .nav-link:hover {
    background: #F4F9FC;
    color: var(--di-primary);
}

.di-price-tabs .nav-link.active {
    background: var(--di-primary);
    color: #ffffff;
    border-color: var(--di-primary);
    box-shadow: var(--di-shadow-md);
}

.di-price-card {
    background: var(--di-card-bg);
    border: 1px solid var(--di-border);
    border-radius: var(--di-radius-lg);
    overflow: hidden;
    box-shadow: var(--di-shadow-sm);
}

.di-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    padding: 22px 34px;
    border-bottom: 1px solid #EEF3F7;
    transition: var(--di-transition);
}

.di-price-row:last-child { border-bottom: none; }
.di-price-row:hover { background: #F8FBFD; }

.di-price-name {
    color: var(--di-title);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
}

.di-price-cost {
    text-align: right;
    white-space: nowrap;
}

.di-price-current {
    font-size: 22px;
    font-weight: 700;
    color: var(--di-primary);
    line-height: 1.2;
}

.di-price-old {
    font-size: 14px;
    color: #94A3B8;
    text-decoration: line-through;
}

.di-price-footer {
    margin-top: 35px;
    background: var(--di-card-bg);
    border: 1px solid var(--di-border);
    border-radius: var(--di-radius-md);
    padding: 28px 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    box-shadow: var(--di-shadow-sm);
}

.di-price-footer h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--di-primary);
    margin-bottom: 6px;
}

.di-price-footer p {
    margin: 0;
    color: var(--di-text);
    font-size: 0.95rem;
}


/* -----------------------------------------------------
   3. DI PROCESS COMPONENT (Модуль Этапов Лечения)
----------------------------------------------------- */
.di-process {
    position: relative;
    padding: var(--di-section-padding) 0;
    background: var(--di-card-bg);
}

.di-process-wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-top: 60px;
}

.di-process-line {
    position: absolute;
    top: 20px; 
    left: 8%;
    right: 8%;
    height: 2px;
    background: #D9E7F2;
    z-index: 1;
}

.di-process-item {
    position: relative;
    flex: 1;
    text-align: center;
    z-index: 2;
}

.di-process-number {
    width: 40px;
    height: 40px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--di-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 0 0 6px var(--di-card-bg); 
}

.di-process-image {
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #F4F9FC;
    border: 1px solid var(--di-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--di-transition);
}

.di-process-image img {
    max-width: 70px;
    max-height: 70px;
    height: auto;
    object-fit: contain;
}

.di-process-item:hover .di-process-image {
    transform: translateY(-4px);
    box-shadow: var(--di-shadow-md);
    background: var(--di-card-bg);
    border-color: var(--di-accent);
}

.di-process-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--di-primary);
    margin-bottom: 12px;
}

.di-process-item p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--di-text);
    margin: 0 auto;
    max-width: 220px;
}


/* -----------------------------------------------------
   4. СМАРТ-МЕДИА ЗАПРОСЫ (АДАПТИВНОСТЬ КЛАССА ПРЕМИУМ)
----------------------------------------------------- */
@media (min-width: 992px) {
    .di-price-tabs {
        justify-content: center;
    }
}

@media (max-width: 991px) {
    .di-price, .di-process {
        padding: 60px 0;
    }
    
    .di-price-tabs-container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 50px;
        height: 100%;
        background: linear-gradient(90deg, rgba(250,252,255,0) 0%, var(--di-bg) 100%);
        pointer-events: none;
        z-index: 5;
    }

    .di-price-row { padding: 20px 24px; }
    .di-price-footer { display: block; text-align: center; }
    .di-price-footer .di-btn { margin-top: 20px; width: 100%; }

    .di-process-wrapper {
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px;
    }
    .di-process-line { display: none; }
    .di-process-item { flex: 0 0 calc(50% - 20px); }
}

@media (max-width: 767px) {
    .di-price-tabs .nav-link {
        font-size: 14px;
        padding: 10px 18px;
    }

    .di-price-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
    }
    .di-price-name { font-size: 15px; padding-right: 12px; }
    .di-price-current { font-size: 18px; }

    .di-process-wrapper { display: block; margin-top: 40px; }
    .di-process-item {
        position: relative;
        padding-left: 60px;
        text-align: left;
        margin-bottom: 35px;
        width: 100%;
    }
    .di-process-item:last-child { margin-bottom: 0; }
    .di-process-number { position: absolute; left: 0; top: 0; margin: 0; z-index: 3; }
    
    .di-process-item::before {
        content: "";
        position: absolute;
        left: 19px;
        top: 40px;
        width: 2px;
        height: calc(100% + 15px);
        background: #D9E7F2;
        z-index: 1;
    }
    .di-process-item:last-child::before { display: none; }
    
    .di-process-image { display: none; } 
    .di-process-item h3 { font-size: 18px; margin-bottom: 6px; }
    .di-process-item p { max-width: none; font-size: 14px; }
}