/* =========================================
   БАЗОВЫЕ СТИЛИ И КНОПКИ
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    background: transparent;
    transition: var(--transition);
}
.btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* =========================================
   HERO СЕКЦИЯ
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}
.hero__content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}
.hero__title {
    font-size: clamp(64px, 8vw, 120px);
    margin-bottom: 24px;
    text-transform: uppercase;
    line-height: 0.9;
}
.hero__title span {
    color: var(--accent);
    display: block;
}
.hero__subtitle {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 48px;
}

/* Анимация слова */
.dynamic-word {
    color: var(--accent);
    display: inline-block;
    transition: font-family 0.5s ease, transform 0.5s ease;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
}
.dynamic-word.alt-font {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    transform: scale(1.05) translateY(5px);
}

/* Фоновая карусель */
.hero__visual {
    position: absolute;
    right: -5%;
    top: 0;
    width: 75vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
    opacity: 0.85;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 20%, black 60%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 20%, black 60%);
}
.hero__visual-row {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll 400s linear infinite;
}
.hero__visual-row:nth-child(even) {
    animation-direction: reverse;
}
.hero__visual-item {
    width: 350px;
    height: 400px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 24px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    flex-shrink: 0;
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================
   ДОКТОР БРЕЗЕЛЬ
   ========================================= */
.doctor-section {
    padding: 120px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.doctor__inner {
    display: flex;
    align-items: center;
    gap: 60px;
}
.doctor__image-placeholder {
    width: 400px;
    height: 500px;
    background: var(--bg-color);
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 20px;
    text-align: center;
    flex-shrink: 0;
}
.doctor__content { flex: 1; }
.doctor__quote {
    font-family: var(--font-heading);
    font-size: 36px;
    line-height: 1.2;
    margin-bottom: 30px;
}
.doctor__quote span { color: var(--accent); }

/* =========================================
   БЕГУЩАЯ СТРОКА
   ========================================= */
.ticker {
    padding: 30px 0;
    background: var(--accent);
    color: var(--bg-color);
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--border);
}
.ticker__inner {
    display: inline-block;
    animation: ticker 200s linear infinite;
}
.ticker__item {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 40px;
}
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================
   ЧАТ
   ========================================= */
.chat-widget {
    margin-top: 40px;
    background: #1A1A1A;
    border: 1px solid #333;
    border-radius: 24px;
    padding: 20px;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    height: 600px;
    position: relative;
    overflow: hidden;
}
.chat-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2A2A2A;
    margin-bottom: 15px;
}
.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 20px;
    color: #000;
}
.chat-info h4 { font-size: 16px; margin: 0; color: #fff; }
.chat-info .status { font-size: 12px; color: #4CAF50; display: flex; align-items: center; gap: 5px; }
.status-dot { width: 6px; height: 6px; background: #4CAF50; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; padding-right: 5px; scroll-behavior: smooth; }
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
.msg-wrapper { display: flex; flex-direction: column; max-width: 85%; }
.msg-wrapper.user { align-self: flex-end; align-items: flex-end; }
.msg-wrapper.bot { align-self: flex-start; align-items: flex-start; }
.msg { padding: 12px 16px; border-radius: 20px; font-size: 15px; line-height: 1.4; position: relative; word-wrap: break-word; }
.msg-wrapper.user .msg { background: var(--accent); color: #000; border-bottom-right-radius: 4px; }
.msg-wrapper.bot .msg { background: #2A2A2A; color: #fff; border-bottom-left-radius: 4px; }
.msg-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; color: #666; position: relative; }
.msg-meta span { cursor: default; transition: color 0.3s; }
.msg-meta span:hover { color: var(--accent); }
.msg-meta .copy-icon { opacity: 0; transform: translateX(-10px); transition: all 0.3s ease; cursor: pointer; display: flex; align-items: center; position: absolute; right: -25px; }
.msg-meta:hover .copy-icon { opacity: 1; transform: translateX(0); }
.copy-icon svg { width: 14px; height: 14px; fill: currentColor; }
.copy-icon:hover { color: var(--accent); }
.chat-input-wrap { display: flex; align-items: center; gap: 10px; margin-top: 15px; background: #222; border-radius: 30px; padding: 5px 15px; border: 1px solid #333; }
.chat-input-wrap input { flex: 1; background: transparent; border: none; padding: 12px 0; color: #fff; outline: none; font-size: 15px; }
.chat-input-wrap button { background: transparent; border: none; cursor: pointer; color: var(--accent); display: flex; align-items: center; justify-content: center; padding: 8px; border-radius: 50%; transition: background 0.3s; }
.chat-input-wrap button:hover { background: rgba(255, 166, 0, 0.1); }
.chat-input-wrap button svg { width: 20px; height: 20px; fill: currentColor; }
.stickers-panel { position: absolute; bottom: 80px; left: 20px; right: 20px; background: #1E1E1E; border: 1px solid #333; border-radius: 16px; padding: 15px; display: none; grid-template-columns: repeat(4, 1fr); gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 10; }
.stickers-panel.active { display: grid; }
.sticker-item { width: 100%; aspect-ratio: 1; background-size: 300% 400%; background-repeat: no-repeat; border-radius: 12px; cursor: pointer; transition: transform 0.2s; border: 1px solid #333; }
.sticker-item:hover { transform: scale(1.1); border-color: var(--accent); }
.msg-sticker { width: 120px; height: 120px; background-size: 300% 400%; background-repeat: no-repeat; border-radius: 16px; margin-top: 5px; }
.chat-input-wrap.disabled { opacity: 0.5; pointer-events: none; }

/* =========================================
   СЕКЦИЯ ОБОРУДОВАНИЯ (ФИНАЛ)
   ========================================= */
.section-equip {
    padding: 100px 0;
    overflow: hidden;
    background: var(--bg-color);
}
.section-equip h2 {
    text-align: center;
    font-size: 48px;
    margin-bottom: 60px;
    text-transform: uppercase;
}

.equip-scroll-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 30px;
    padding: 40px 15%; /* Отступы по 15% для десктопа */
    perspective: 2000px;
    perspective-origin: center center;
    cursor: grab;
    scroll-padding: 0 15%;
    align-items: center;
    justify-content: center;
}
.equip-scroll-wrapper::-webkit-scrollbar { display: none; }
.equip-scroll-wrapper:active { cursor: grabbing; }

/* Невидимые спейсеры по краям (для десктопа) */
.equip-spacer {
    flex: 0 0 calc(50vw - 175px);
    height: 1px;
    pointer-events: none;
}

.equip-card {
    flex: 0 0 350px;
    height: 500px;
    scroll-snap-align: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s, transform 0.6s ease;
    position: relative;
    box-shadow: 20px 0 40px rgba(0,0,0,0.5);
    cursor: pointer;
    transform: rotateY(-15deg) scale(0.95);
    transform-origin: center center;
    will-change: transform;
}

.equip-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 166, 0, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 166, 0, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    background-size: 200% 200%;
    animation: smokeMove 6s ease-in-out infinite alternate;
    z-index: 2;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
    border-radius: var(--radius);
}
@keyframes smokeMove {
    0% { background-position: 0% 0%; transform: scale(1); }
    100% { background-position: 100% 100%; transform: scale(1.1); }
}

.equip-card.is-centered {
    flex: 0 0 800px;
    flex-direction: row;
    transform: rotateY(0deg) scale(1);
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(255, 166, 0, 0.15);
}
.equip-card.is-centered::before {
    opacity: 0;
}

.equip-img {
    width: 100%;
    height: 60%;
    background: linear-gradient(135deg, #1A1A1A 0%, #0A0A0A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 16px;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    position: relative;
    border-bottom: 1px solid var(--border);
    transition: width 0.6s ease, height 0.6s ease, border 0.3s;
    flex-shrink: 0;
    z-index: 1;
}
.equip-img::after { content: '3D МОДЕЛЬ'; position: absolute; opacity: 0.3; }
.equip-card.is-centered .equip-img {
    width: 50%; 
    height: 100%;
    border-bottom: none;
    border-right: 1px solid var(--border);
}

.equip-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
    z-index: 1;
    transition: opacity 0.3s;
    opacity: 0.3;
}
.equip-card.is-centered .equip-content { opacity: 1; }
.equip-content h3 { color: var(--accent); font-size: 24px; margin-bottom: 10px; }
.equip-content p { color: var(--text-muted); font-size: 15px; line-height: 1.5; margin-bottom: 20px; }

/* Кнопка */
/* --- Кнопка с двойным текстом --- */
.equip-tag {
    margin-top: auto;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 30px;
    display: inline-block;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
    transition: border-color 0.3s;
    /* Убираем фиксированную высоту, пусть зависит от текста */
    line-height: 1.5;
}

/* Слой заливки */
.equip-tag-fill {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    z-index: 0;
    transition: width 0.05s linear;
    pointer-events: none;
    border-radius: 30px;
}

/* Белый текст (в потоке, задает размер) */
.equip-tag-text-white {
    display: block;
    position: relative;
    color: var(--text-main);
    z-index: 1;
}

/* Черный текст (абсолютный, накладывается сверху) */
.equip-tag-text-black {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    z-index: 2;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.05s linear;
    white-space: nowrap;
    pointer-events: none;
}

/* Контейнер должен иметь относительное позиционирование для текста */
.equip-tag {
    position: relative;
}

/* =========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (ЕДИНЫЙ БЛОК)
   ========================================= */
@media (max-width: 1024px) {
    /* Hero */
    
    .hero__title { font-size: clamp(48px, 10vw, 80px); }
    .hero__subtitle { font-size: 18px; }
    
    /* Доктор */
    .doctor__inner { flex-direction: column; text-align: center; gap: 30px; }
    .doctor__image-placeholder { width: 100%; max-width: 300px; height: 400px; }
    .doctor__quote { font-size: 28px; }
    
    /* Оборудование */
    .equip-card { transform: rotateY(-10deg) scale(0.95); }
}

@media (max-width: 768px) {
    /* Отступы секций */
    .section-equip, .doctor-section { padding: 60px 0; }
    .hero {
        padding: 90px 0 40px; /* Уменьшили отступ сверху */
    }    .ticker { padding: 20px 0; }
        .equip-tag {
        font-size: 10px; /* Чуть меньше шрифт */
        padding: 6px 12px; /* Чуть меньше отступы */
        min-width: 100px; /* Минимальная ширина для мобилок */
    }
    /* Hero */
    
    .hero__subtitle { margin-left: auto; margin-right: auto; }
    .hero__title { margin-bottom: 20px; }
    
    /* Карусель оборудования */
    .equip-scroll-wrapper {
        padding: 20px 15px; /* Отступы по 15px */
        gap: 15px;
        justify-content: flex-start;
        scroll-padding: 0;
    }
    .equip-spacer { display: none; } /* Убираем спейсеры на мобилках */
    .equip-card {
        flex: 0 0 calc(100vw - 60px); /* Карточка сжимается под экран */
        height: 450px;
        transform: rotateY(-5deg) scale(0.95);
    }
    .equip-card.is-centered {
        flex: 0 0 calc(100vw - 40px);
        transform: rotateY(0deg) scale(1);
    }
    .equip-card.is-centered .equip-img { width: 100%; height: 50%; } /* Фото сверху */
    .equip-card.is-centered .equip-content { width: 100%; height: 50%; }
    .equip-card.is-centered { flex-direction: column; } /* На телефоне карточка остается вертикальной */
    
    /* Чат */
    .chat-widget { height: 500px; margin-top: 20px; }
    .chat-messages { padding-right: 0; }
    .msg { max-width: 90%; font-size: 14px; }
    .msg-wrapper { max-width: 90%; }
    .chat-input-wrap { padding: 5px 10px; }
    .chat-input-wrap input { font-size: 14px; }
    
    /* Стикеры */
    .stickers-panel { grid-template-columns: repeat(3, 1fr); bottom: 70px; }
    .msg-sticker { width: 100px; height: 100px; }
    
    /* Форма */
    #lead-form { padding: 60px 20px !important; }
    #form-lead { max-width: 100%; }
    
    /* Футер */
    footer .container { flex-direction: column; text-align: center; gap: 20px; }
    footer .container > div:last-child { justify-content: center; }
}

@media (max-width: 480px) {
    /* Хедер на маленьких экранах — прозрачнее */
    .header {
        background: rgba(10, 10, 10, 0.3);
        padding-top: max(16px, env(safe-area-inset-top) + 5px);
        
    }
    
    /* Hero на совсем маленьких */
    .hero { padding: 120px 0 40px; }
    .hero__title { font-size: 36px; }
}

/* Обертка для ввода телефона */
.phone-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 16px;
    height: 54px; /* Под стандартные инпуты */
    transition: border-color 0.3s;
}
.phone-input-wrap:focus-within {
    border-color: var(--accent);
}

/* Кнопка выбора страны */
.country-select-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    cursor: pointer;
    padding-right: 12px;
    border-right: 1px solid var(--border);
    margin-right: 12px;
}
.country-flag {
    font-size: 20px; /* Эмодзи флага */
    line-height: 1;
}

/* Сам инпут */
.phone-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 16px;
    outline: none;
    padding: 0;
}

.call-human-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: transparent;
    border: 1px dashed var(--accent);
    color: var(--accent);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.call-human-btn:hover {
    background: rgba(255, 166, 0, 0.1);
    border-style: solid;
}