/* ПОЛНЫЙ CSS ДЛЯ САЙТА СТРОИТЕЛЬНОЙ КОМПАНИИ "ВАШ ПОМОЩНИК"
   Особенности: Горизонтальный свайп, адаптивное меню, премиальный минимализм.
   
   СОДЕРЖАНИЕ:
   
   РАЗДЕЛ 2. HEADER И БУРГЕР-МЕНЮ
   РАЗДЕЛ 3. ЭКСПЕРТНОЕ ОКНО
   РАЗДЕЛ 7. ОБРАТНЫЙ ЗВОНОК
   РАЗДЕЛ 8. ЧАТ
   РАЗДЕЛ 9. ОКНА И КНОПКИ
   РАЗДЕЛ 10. ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ
   РАЗДЕЛ 11. ПРЕДЛОЖЕНИЕ ГАЙДА
   РАЗДЕЛ 12. ВИДЖЕТ ВОЗВРАТА К СМЕТЕ
   РАЗДЕЛ 13. ИКОНКИ СОЦСЕТЕЙ
   СЕКЦИЯ INTEREST
*/

:root {
    --main-bg: #ffffff;
    --side-bg: #111111;
    --accent: #c5a059; /* Золотисто-бронзовый */
    --text-dark: #222222;
    --text-light: #ffffff;
    --header-h: 5em;
    --nav-width: 20%;
    --transition-base: all 0.3s ease;
    --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 1. ОБЩИЕ СТИЛИ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none !important; /* Для Firefox */
}

/* Скрываем скроллбар для всех элементов во всех браузерах на движке Chromium (Яндекс, Хром, Опера) */
*::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

html {
    font-size: 16px;
    min-height: 100%;
    height: 100%;
    width: 100%;
    position: relative;
    scroll-padding-top: var(--header-h);
}

body {
    -ms-overflow-style: none;
    font-family: sans-serif;
    color: var(--text-dark);
    background-color: var(--main-bg);
    overflow: hidden; /* Отключаем вертикальный скролл всей страницы */
}

.indent_3 {
    margin-bottom: clamp(1rem, 3vh, 3rem);
}

.wave-block .feature-cell {
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease; 
    animation: strictWaveBg 10.5s ease-in-out infinite;
}

.wave-block .feature-cell:nth-of-type(1) { animation-delay: 0.5s; }
.wave-block .feature-cell:nth-of-type(2) { animation-delay: 3.0s; }
.wave-block .feature-cell:nth-of-type(3) { animation-delay: 5.5s; }
.wave-block .feature-cell:nth-of-type(4) { animation-delay: 8.0s; }

@keyframes strictWaveBg {
    0% { 
        background: #fff; 
        transform: translate3d(0, 0, 0);
    }
    3% { 
        background: #f7f3e6; 
        transform: translate3d(0, -2px, 0); 
    }
    18% { 
        background: #f7f3e6; 
        transform: translate3d(0, -2px, 0); 
    }
    21% { 
        background: #fff; 
        transform: translate3d(0, 0, 0); 
    }
    100% { 
        background: #fff; 
        transform: translate3d(0, 0, 0); 
    }
}

.wave-block:hover .feature-cell {
    animation-play-state: paused;
    background: #fff !important;
    transform: translate3d(0, 0, 0) !important;
}

.wave-block .feature-cell:hover {
    background: #f7f3e6 !important;
    transform: translate3d(0, -4px, 0) !important;
}

.wave-text b {
    display: inline-block;
    position: relative;
    transform: translateY(0);
    /* Один цикл длится 12 секунд (9.6с на очередь из 8 слов + 2.4с общая пауза) */
    animation: strictQueueWave 12s ease-in-out infinite;
    animation-fill-mode: forwards; 
}

/* Каждое следующее слово ждет ровно 1.2 секунды, пока полностью отработает предыдущее */
.wave-text b:nth-of-type(1) { animation-delay: 0.0s; }
.wave-text b:nth-of-type(2) { animation-delay: 1.2s; }
.wave-text b:nth-of-type(3) { animation-delay: 2.4s; }
.wave-text b:nth-of-type(4) { animation-delay: 3.6s; }
.wave-text b:nth-of-type(5) { animation-delay: 4.8s; }
.wave-text b:nth-of-type(6) { animation-delay: 6.0s; }
.wave-text b:nth-of-type(7) { animation-delay: 7.2s; }
.wave-text b:nth-of-type(8) { animation-delay: 8.4s; }

/* Математика таймлайна (1.2 секунды от 12 секунд — это ровно 10%) */
@keyframes strictQueueWave {
    0% { transform: translateY(0); }
    5% { transform: translateY(-3px); } /* Пик прыжка на 0.6 сек */
    10% { transform: translateY(0); }  /* Возврат на место на 1.2 сек */
    100% { transform: translateY(0); }
}

.span-accent {
    color: var(--accent);
    padding-bottom: 2px;
    border-bottom: 2px solid var(--accent);
    white-space: nowrap;
}

.span-dark {
    color: var(--text-dark);
    padding-bottom: 2px;
    border-bottom: 2px solid var(--accent);
    white-space: nowrap;
}

/* Общие стили для SVG */
.icon-svg {
    display: inline-flex;
    flex-shrink: 0;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.icon-svg:hover {
    transform: scale(1.1);
}

.icon-svg:active {
    transform: scale(0.95);
    transform: translateY(2px);
}

.inline-svg {
    display: inline-block;
    margin-left: 3px;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
    transform: translateX(0px);
    transition: transform 0.3s ease;
}

button:hover .inline-svg,
a:hover .inline-svg{
    transform: translateX(5px);
}

button:active .inline-svg,
a:active .inline-svg {
    transform: translateX(0px);
}

.fas, .fab {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.nowrap {
    white-space: nowrap;
}

@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    .mobile-hide {
        display: none !important;
    }
    
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* 2. HEADER И БУРГЕР-МЕНЮ */
.main-header {
    width: 100%;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1003;
}

/* Скрываем мобильные элементы на ПК по умолчанию */
.menu-toggle, .phone-icon-circle {
    display: none;
}

.logo a {
    color: inherit !important;
    text-decoration: none !important;
}

.logo-desktop {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo-desktop span {
    color: #b8860b;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

.work-time {
    font-size: 0.75rem;
    color: #555;
    text-align: right;
    border-right: 1px solid #ddd;
    padding-right: 20px;
    text-transform: uppercase;
}

.contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.phone-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}

.socials {
    display: flex;
    gap: 10px;
}

.socials a {
    text-decoration: none;
    font-size: 1.2rem;
    color: var(--accent);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center; /* Центрирование иконок мессенджеров */
    background: #f8f8f8;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.socials a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    .main-header {
        padding: 0 20px;
    }
}

.wrapper {
    display: flex;
    margin-top: var(--header-h);
    height: calc(100vh - var(--header-h));
    width: 100%;
}

.side-nav {
    width: var(--nav-width);
    height: 100%;
    background: var(--side-bg);
    display: flex;
    flex-direction: column;
    z-index: 1002;
    transition: left 0.4s ease;
}

.nav-container {
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

.nav-link {
    padding: 1.8rem 2rem;
    color: #999;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    border-bottom: 1px solid #1a1a1a;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--text-light);
    background: #161616;
    padding-left: 2.5rem;
    box-shadow: inset 4px 0 0 var(--accent);
}

/* Класс для активной ссылки (добавляется скриптом) */
.nav-link.active {
    color: var(--text-light);
    background: #1a1a1a;
    padding-left: 2.8rem;
    box-shadow: inset 4px 0 0 var(--accent);
}

.nav-link.active .num {
    color: var(--accent);
}

.nav-link .num {
    margin-right: 12px;
    color: #767676;
    transition: color 0.3s ease;
}

@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    /* Меню: Выезжающая панель */
    .side-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        padding-top: 6em;
    }

    .side-nav.active {
        left: 0;
        box-shadow: 10px 0 50px rgba(0,0,0,0.5);
    }
    
    .menu-toggle .icon-chevron {
        animation: arrow-nudge 2.5s ease-in-out infinite;
        animation-delay: 1s;
        display: inline-block; /* Обязательно для работы transform */
        text-shadow: 0 0 10px rgba(197, 160, 89, 0.4);
    }
    
    .contacts {
        gap: 10px;
    }
}

@keyframes arrow-nudge {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-5px); } /* Толчок влево */
    40%      { transform: translateX(2px); }  /* Мягкий откат вправо */
    60%      { transform: translateX(-3px); } /* Снова влево, но слабее */
    80%      { transform: translateX(1px); }
}

/* РАЗДЕЛ 3. ЭКСПЕРТНОЕ ОКНО */
.side-chat-offer {
    opacity: 0;
    max-width: 100%;
    min-width: 160px;
    margin: auto 2rem 15px 2rem;
    border-radius: 10px;
    padding: 25px 15px 15px 15px;
    background: var(--accent);
    box-shadow: inset 0 0 10px #6b4e06;
    transition: opacity 0.5s ease, transform 1s ease;
    transform: translateY(100%);
}

.side-chat-offer.active {
    opacity: 1;
    transform: translateY(0);
}

.side-chat-offer-inner {
    text-align: center;
}

.side-chat-avatar {
    margin-bottom: 8px;
}

.side-chat-avatar img {
    width: 70%;
    max-width: 80px;
    border-radius: 10px;
    box-shadow: 2px 2px 4px #6b4e06;
}

.side-chat-offer p {
    color: #333;
    font-size: clamp(0.6rem, 1vw, 0.95rem);
    line-height: 1.35;
    margin: 0 0 14px 0;
}

.side-chat-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.side-btn-no,
.side-btn-yes {
    padding: 10px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex: 1;
    max-width: 110px;
}

.side-btn-no {
    background: #f5f0e6;
    color: #666;
    border: 1px solid #e0d5b8;
}

.side-btn-no:hover {
    background: #e8e0d0;
}

.side-btn-yes {
    background: #222;
    color: #fff;
    border: none;
    box-shadow: 0 3px 8px rgba(184, 134, 11, 0.3);
}

.side-btn-yes:hover {
    background: #000;
    transform: translateY(-1px);
}

@media (max-width: 1090px) {
    .side-chat-offer {
        margin-left: 10px;
        margin-right: 10px;
    }
}

@media (max-width: 880px), (max-height: 815px) and (orientation: landscape) {
    .side-chat-offer {
        display: none;
    }
}

/* 4. СЛАЙДЕР И СЕКЦИИ */
.content-slider {
    width: calc(100% - var(--nav-width));
    height: 100%;
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    position: relative;
    background: #fff;
}

.step {
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    flex-shrink: 0; /* Чтобы секции не сжимались */
    position: relative;
    padding: 60px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
}

.inner {
    display: block;
    max-width: 750px;
    width: 100%;
    margin: auto; /* центрирует блок внутри flex-контейнера */
    -webkit-overflow-scrolling: touch;
    /* flex-properties для корректного расчета высоты в Safari */
    flex: 0 1 auto; 
    min-height: 0;
    /* Ограничение высоты под контент */
    max-height: 100%; 
    padding: 30px 20px;
    box-sizing: border-box;
    text-align: center;
    z-index: 10;
    /* Включаем скролл внутри контента */
    overflow-y: auto;
    overflow-x: hidden;     
}

.inner h1, .inner h2 {
    line-height: 1.15;
    margin-bottom: clamp(1rem, 3vh, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
}

.inner h1 { 
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
}

.inner h2 { 
    font-size: clamp(1.5rem, 2vw, 2.5rem);
}

.inner p {
    line-height: 1.5;
    font-size: clamp(0.85rem, 1vw, 1.2rem);
}

.hero-bg {
    background: #111 url('../pix/bg/renov.webp') no-repeat center/cover; 
    color: #fff;
}
.interest-bg {
    background: 
        linear-gradient(135deg, rgba(245, 247, 250, 0.85), rgba(195, 207, 226, 0.85)),
        url('../pix/bg/main.webp') center center/cover no-repeat fixed;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

/* 5. НАВИГАЦИЯ (СТРЕЛКИ) - ИСПРАВЛЕННОЕ ЦЕНТРИРОВАНИЕ */
.nav-arrow {
    position: fixed;
    top: 55%;
    transform: translateY(-50%);
    background: var(--accent);
    color: white;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center; /* Строго по центру */
    font-size: 1.6rem;
    line-height: 1; /* Убираем лишние отступы текста */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    background: #ac8a4d;
    transform: translateY(-50%) scale(1.1);
}

.prev { left: calc(var(--nav-width) + 0px); border-radius: 0 50% 50% 0; }
.next { right: 0; border-radius: 50% 0 0 50%; }

/* 6. КНОПКИ И ТЕКСТ */
.features-grid {
    display: flex;
    gap: 20px;
    margin-bottom: clamp(1rem, 3vh, 3rem);
    text-align: left;
    flex-wrap: wrap;
}

.feature-item {
    flex: 1;
    border-left: 3px solid var(--accent);
    padding: 10px 0px 10px 20px;
    background: rgba(256, 256, 256, 0.3);
    border-radius: 10px 10px 10px 0;
}

.feature-item h3 {
    font-size: clamp(0.7rem, 0.85vw, 0.8rem);
    margin-bottom: clamp(0.3rem, 1vh, 0.6rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-item p,
.feature-cell p {
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    color: #666666;
}

.feature-cell {
    background: #fff;
    padding: clamp(0.8em, 4vw, 1.1em);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    flex: 1;
    flex-basis: 250px;
    transition: all 0.3s ease;
}

.feature-cell h3 {
    font-size: clamp(0.9rem, 1vw, 1.1rem);
    margin-bottom: clamp(0.3rem, 1vh, 0.6rem);
    display: inline-flex;
    gap: 8px;
}

.lead-text {
    position: relative;
    width: 100%; /* Растягиваем на всю ширину .inner (750px) */
    margin-bottom: clamp(1rem, 3vh, 3rem);
    padding: 40px 50px; /* Больше отступов внутри: текст «дышит» */
    background: rgba(250, 250, 250, 0.8);
    border-radius: 12px;
    color: #444;
    line-height: 1.8; /* Увеличили межстрочный интервал */
    font-size: clamp(0.8rem, 1.1vw, 1.1rem);
    border: 1px solid #f2f2f2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02); /* Едва заметная тень для объема */
}

/* Декоративная кавычка: делаем её чуть больше и изящнее */
.lead-text::before {
    content: '“';
    position: absolute;
    top: 5px;
    left: 25px;
    font-family: sans-serif;
    font-size: 5rem;
    color: var(--accent);
    opacity: 0.4;
    line-height: 1;
}

.faq-container {
    text-align: left;
    margin-bottom: clamp(1rem, 3vh, 3rem);
}

.faq-container h3 {
    font-size: clamp(0.8rem, 1vw, 1rem);
    margin-bottom: clamp(0.9rem, 1vh, 1rem);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.faq-container details {
    margin-bottom: clamp(0.6rem, 1vh, 0.8rem);
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
}

.faq-container summary {
    padding: 0.7em 1em;
    font-weight: 600;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    cursor: pointer;
    outline: none;
}

.faq-container p {
    padding: 0 1em 0.8em 1em;
    font-size: clamp(0.75rem, 0.9vw, 0.9rem);
    color: #666;
}

@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    .feature-item {
        padding: 5px;
    }
    
    .hero-bg {
        background: #111 url('../pix/bg/renov_mobile.webp') no-repeat center/cover; 
        color: #fff;
    }
    .interest-bg {
        background: 
            linear-gradient(135deg, rgba(245, 247, 250, 0.85), rgba(195, 207, 226, 0.85)),
            url('../pix/bg/main_mobile.webp') no-repeat center/cover;
    }
    
    .features-grid {
        gap: 8px;
    }
    
    .lead-text {
        padding: 15px;
    }
}

/* СЕКЦИЯ "ПРАЙС-ЛИСТ" */
.price-card {
    background: rgba(250, 250, 250, 0.8);
    padding: 15px;
    border-radius: 12px;
    text-align: left;
    border: 1px solid #eee;
    margin-bottom: clamp(1rem, 3vh, 3rem);
}

.price-card h3 {
    margin-bottom: clamp(1rem, 3vh, 3rem);
    font-size: clamp(1rem, 1.2vw, 1.3rem);
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dotted #ccc;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
}

.price-row:last-child {
    border-bottom: none;
}
.price-category {
    padding-right: 10px;
}
.price-value {
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-dark);
}

/* Стилизация микро-текста под кнопкой */
.sub-cta {
    margin-top: clamp(0.65rem, 2vh, 1.2rem);
    font-size: clamp(0.75rem, 0.8vw, 0.85rem);
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; 
}

.light-bg {
    color: #777; 
}

.dark-bg {
    color: #ccc; 
}

/* Эстетический эффект: точка или тире перед текстом */
.sub-cta::before {
    content: '';
    width: 4px;
    height: 4px;
    background-color: var(--accent); /* фирменная бронза */
    border-radius: 50%;
    display: inline-block;
}

.dark-text { color: var(--text-dark); }

/* СЕКЦИЯ "НАШИ РАБОТЫ" */
.portfolio-grid {
    display: flex;
    margin-bottom: clamp(1rem, 3vh, 3rem);
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    justify-content: flex-start;
    flex-direction: row; /* Оставляем в ряд */
    flex-wrap: nowrap;   /* Запрещаем перенос */
    width: 100%;         /* Контейнер НЕ должен быть шире экрана! */
    overflow-x: auto;    /* Включаем внутреннюю прокрутку */
    overflow-y: hidden;
    gap: 15px;
    padding: 10px;
}

.portfolio-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 0 rgba(0,0,0,0.08);
    flex: 0 0 85%; /* Карточка занимает 85% ширины экрана, чтобы была видна следующая */
    scroll-snap-align: center;
    max-height: clamp(180px, 40vh, 400px);
    min-width: 230px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    opacity: 0.7;
    transform: translateY(-50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Когда секция становится активной*/
.step.active .portfolio-card {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-grid .portfolio-card:hover {
    transform: scale(1.02) translateY(-5px);
    opacity: 1;
    z-index: 20;
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

/* Задержка для каждой следующей карточки */
.portfolio-card:nth-child(1) { transition-delay: 0.1s; }
.portfolio-card:nth-child(2) { transition-delay: 0.2s; }
.portfolio-card:nth-child(3) { transition-delay: 0.3s; }
.portfolio-card:nth-child(4) { transition-delay: 0.2s; }
.portfolio-card:nth-child(5) { transition-delay: 0.1s; }
.portfolio-card:nth-child(n+6) { transition-delay: 0.1s; }

.card-img {
    height: 180px; /* Фиксированная высота для компактности */
    background-size: cover;
    background-position: top left;
    position: relative;
    cursor: copy;
}

.card-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: #000;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
}

.card-tag:hover svg {
    transform: translateX(2px);
}

.card-desc {
    padding: clamp(0.8em, 4vw, 1em);
    text-align: left;
    cursor: copy;
}

.card-desc h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.card-desc p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.3;
}

/* 7. ОБРАТНЫЙ ЗВОНОК В ХЕДЕРЕ */
.callback-trigger {
    background: transparent;
    border: 1px solid var(--accent);
    color: #b8860b;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.callback-trigger:hover {
    background: var(--accent);
    color: #fff;
}

.callback-icon { 
    display: none; 
}

/* Шапка модалки */
.modal-header h3 {
    font-size: 1.8rem;
    color: #222;
    margin-bottom: 10px;
    font-weight: 800;
}
.modal-header p {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 30px;
    line-height: 1.4;
}

/* Группа ввода с эффектом Float Label */
.input-group {
    position: relative;
    margin-bottom: clamp(7px, 2vw, 15px);
}

/* Стили самой подписи */
.input-group label {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #999;
    pointer-events: none; /* Чтобы клик проходил сквозь текст в поле */
    transition: all 0.2s ease-out;
    background-color: transparent;
    padding: 0 5px;
}

/* Состояние, когда поле в фокусе ИЛИ не пустое */
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.75rem;
    color: #b8860b;
    border-radius: 4px 4px 0 0;
    background-color: #fff; /* Перекрываем рамку, чтобы текст был читаем */
    transform: translateY(-50%) scale(0.9);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Небольшая правка для input, чтобы текст не наезжал на рамку */
.input-group input::placeholder {
    color: transparent; /* Прячем дефолтный плейсхолдер, пока поле пустое */
}

.input-group input:focus::placeholder {
    color: #ccc; /* Показываем маску (+7...), только когда юзер нажал на поле */
}

.input-group input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s;
    background: #f9f9f9;
}

.input-group input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.1);
    outline: none;
}

.modal-footer {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

.chat-invitation p {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 15px;
}

/* Кнопка отправки - мощная и солидная */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #222 0%, #444 100%);
    color: #fff;
    padding: 20px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-chat-alt {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f8f9fa; /* Светлый, ненавязчивый фон */
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-chat-alt .btn-icon {
    color: var(--accent); /* Твой золотой акцент только на иконке */
    display: flex;
    align-items: center;
}

.btn-chat-alt:hover {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.15);
    transform: translateY(-2px);
}

.btn-chat-alt:active {
    transform: translateY(0);
}

/* РАЗДЕЛ 8. ЧАТ */
.chat-window {
    padding: 0 !important;
}

.chat-header {
    background: #fdfaf4;
    border-radius: 20px 20px 0 0;
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(197, 160, 89, 0.6);
}

.master-avatar {
    position: relative;
    margin-right: 12px;
}

.master-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #c5a059;
}

.master-info {
    text-align: left;
}

.master-info strong {
    display: block;
}

.master-info span {
    font-size: clamp(0.7rem, 0.8vw, 0.9rem);
}

.online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #2ecc71;
    border: 2px solid #fff;
    border-radius: 50%;
}

.chat-messages {
    height: 350px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}

.msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 15px;
    font-size: 0.85em;
    line-height: 1.4;
}

.bot-msg {
    background: #f1f1f1;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    text-align: left;
    box-shadow: 1px 1px 1px grey;
    animation: slideInChat 0.3s ease-out;
}

.user-msg {
    background: var(--accent);
    color: var(--text-dark);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    box-shadow: 1px 1px 1px grey;
}

.chatOptions-wrapper {
    overflow: hidden;
}

.chat-options {
    padding: 15px;
    border-radius: 0 0 20px 20px;
    background: #fdfaf4;
    display: block;
    white-space: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    border-top: 1px solid rgba(197, 160, 89, 0.6)
}

/* Запуск анимации при открытии модалки */
.modal.active .chat-options {
    animation: hintScroll 1s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.chat-options::after {
    content: '';
    flex: 0 0 15px; /* Фантомный блок для отступа справа */
}

.opt-btn {
    white-space: nowrap;
    margin-right: 8px;
    opacity: 1;
    background: #fff;
    border: 1px solid #b8860b;
    color: #9d7208;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    transition: 0.3s;
}

.opt-btn:hover {
    background: #c5a059;
    color: var(--text-dark);
}

.opt-btn:disabled {
    background-color: #ccc !important;
    border-color: #999 !important;
    color: #666 !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Сочная премиальная кнопка "Свой вопрос" */
.opt-btn.own-question {
    background: linear-gradient(135deg, #c5a059 0%, #b38a3e 100%);
    color: #fff !important;
    border: none;
    padding: 8px 12px;
    text-shadow: 1px 1px grey;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 
        0 4px 15px rgba(197, 160, 89, 0.4), 
        inset 0 -3px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Бесконечный блик */
.opt-btn.own-question::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%; /* Стартуем далеко слева */
    width: 40%;
    height: 200%;
    background: linear-gradient(
        to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.5) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: rotate(30deg);
    /* Запускаем бесконечную анимацию */
    animation: shine-infinite 4s infinite linear;
}
/* Реакция на наведение */
.opt-btn.own-question:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.system-msg {
    text-align: center;
    font-size: 12px;
    background: #fff4e5; /* Светло-оранжевый фон */
    color: #856404;
    border-radius: 8px;
    padding: 5px 10px;
    margin: 10px auto;
    width: fit-content;
    border: 1px solid #ffeeba;
}

/* Кнопка "Обсудить с мастером" в результате сметы */
.btn-master-inline {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    text-shadow: 1px 1px grey;
    font-variant: small-caps;
    background: linear-gradient(135deg, #c5a059 0%, #b38a3e 100%);
    color: #fff !important;
    padding: 14px 28px; /* Сделали чуть крупнее */
    border-radius: 12px;
    border: none;
    text-decoration: none;
    font-weight: 800;
    font-size: clamp(15px, 1.2vw + 8px, 18px);
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    overflow: hidden;
    /* Глубокая тень для объема */
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.3);
    /* Запускаем пульсацию всей кнопки */
    animation: btn-pulse 2s infinite;
}

/* Эффект бесконечного блика */
.btn-master-inline::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.4) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: rotate(30deg);
    animation: shine-infinite 3s infinite linear;
}

.btn-master-inline:hover {
    transform: translateY(-4px) scale(1.03);
    filter: brightness(1.1);
    box-shadow: 0 15px 30px rgba(197, 160, 89, 0.4);
}

.btn-master-inline:active {
    transform: translateY(-1px) scale(0.98);
}

.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    cursor: pointer;
    width: 60px;
    height: 60px;
    background: var(--side-bg);
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(34, 158, 217, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: btn-pulse 2s infinite;
}

.chat-widget:hover {
    transform: scale(1.1) translateY(-5px);
    background: var(--accent);
    color: var(--side-bg);
    border-color: var(--side-bg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.chat-widget::after {
    content: "Чат с экспертом";
    position: absolute;
    right: 80px;
    background: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.chat-widget:hover::after {
    opacity: 1;
    visibility: visible;
}

.chat-btn-disabled {
    opacity: 0.5;
    pointer-events: none; /* Кнопка перестает реагировать на клики */
    filter: grayscale(1); /* Делаем её серой */
    cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
    .btn-master-inline {
        animation: none;
    }
}

@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    .msg {
        max-width: 100%;
    }
    
    .btn-master-inline {
        width: 100%; /* Кнопка на всю ширину экрана */
        max-width: 320px;
        order: 1; /* Кнопка мастера всегда первая сверху */
    }
    
    .chat-widget{
        display: none; /* На мобильных подсказка не нужна */
    }
}

@keyframes hintScroll {
    0% { scroll-left: 0; }
    30% { transform: translateX(-30px); }
    60% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}

/* Описание анимации блика */
@keyframes shine-infinite {
    0% { left: -150%; }
    20% { left: 150%; }  /* Быстро пролетает за 0.8 сек (20% от 4с) */
    100% { left: 150%; } /* Остальное время (3.2 сек) "отдыхает" */
}

@keyframes slideInChat {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* РАЗДЕЛ 9. ОКНА И КНОПКИ*/
.modal {
    /* Вместо display: none */
    opacity: 0;
    visibility: hidden; 
    pointer-events: none; /* Чтобы нельзя было кликнуть сквозь невидимое окно */
    position: fixed; 
    z-index: 10001; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0,0,0,0.7); 
    backdrop-filter: blur(4px);
    display: flex; /* Всегда flex, но скрыт через opacity */
    align-items: center;
    justify-content: center;
    /* Плавность для самого фона (оверлея) */
    transition: opacity 0.4s ease, visibility 0.4s;
}

/* Состояние, когда модалка открыта */
.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background-color: #fff;
    padding: clamp(20px, 5vw, 40px);
    width: 93%;
    margin: 0 auto;
    max-width: 670px;
    border-radius: 20px;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    transform: scale(0.9) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
}

/* Анимация контента при открытии */
.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Кнопка закрытия — обновленная версия */
.close-modal {
    position: absolute;
    /* Центрируем крестик ровно на углу */
    right: -15px; 
    top: -15px;
    /* Делаем идеальный круг */
    width: 34px;
    height: 34px;
    background-color: #fff;
    border-radius: 50%;
    /* Центрируем сам символ &times; внутри круга */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    /* Тень, чтобы крестик был виден над темным фоном модалки */
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 10;
    transition: var(--transition-standard);
    border: 1px solid #eee; /* Тонкая кайма для четкости */
}

.close-modal:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button {
    display: inline-flex;
    background: linear-gradient(135deg, var(--accent) 0%, #b38f4d 100%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color: #fff;
    justify-content: center;
    border: none;
    padding: 1.1rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition-bounce);
    text-decoration: none;
    border-radius: 4px;
    animation: btn-pulse 2s infinite;
}

.click_effect:hover {
    transform: scale(1.03) translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.click_effect:active {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4) inset;
    transform: translateY(1px); /* Слегка вдавливаем кнопку */
}

.btn-main {
    flex: 1;
    padding: 18px 30px;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: clamp(0.65rem, 0.8vw, 1.1rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--side-bg); /* Темная, солидная */
    color: #f0f0f0;
}

.btn-main:hover {
    background: #000;
    transform: translateY(-2px);
    color: #fff;
}

.btn-main:active {
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.6);
    transform: translateY(2px); /* Слегка вдавливаем кнопку */
}

.mini {
    background: var(--side-bg);
    color: #fff;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    margin: 20px 10px 0 0;
}

.mini:hover {
    background: var(--accent);
    box-shadow: 0 5px 20px rgba(197, 160, 89, 0.4);
}

.modal-gift-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 20px;
    /* Можно добавить легкое покачивание, как у иконки в лид-магните */
    animation: gift-sway 3s infinite ease-in-out;
}

/* Заголовки и текст */
#modalTitle {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.2;
}

#modalDesc {
    color: #555;
    font-size: clamp(0.9rem, 3vw, 1rem);
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 0 10px;
}

.modal-footer-text {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 20px;
}

/* Кнопка в модальном окне */
.exit-guide-btn {
    display: block;
    text-decoration: none;
    padding: 18px !important; /* Перебиваем стандартный паддинг cta */
    font-weight: bold;
    background: #229ED9 !important; /* Цвет Telegram */
    box-shadow: 0 4px 15px rgba(34, 158, 217, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 20px;
}

/* Эффект блика для кнопки */
.exit-guide-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 80px;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-30deg);
    pointer-events: none;
    animation: lead-shine-v2 3s infinite linear;
}

@keyframes lead-shine-v2 {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

.exit-guide-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(34, 158, 217, 0.5);
    filter: brightness(1.1);
}

.exit-guide-btn:active {
    transform: translateY(-1px);
}

/* Адаптив для мобильных */
@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        padding: 25px 15px;
        margin: 10px;
    }
    
    .btn-main {
        padding: 16px 7px !important;
        border-radius: 12px 12px 0 0 !important;
        border: 1px solid #000 !important;
    }
    
    .close-modal {
        right: -10px;
        top: -10px;
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}

/* РАЗДЕЛ 10. ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ */
.privacy-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px 0 10px 0;
    font-size: 0.7rem; /* Чуть уменьшим шрифт для компактности */
    color: #888;
    text-align: left; /* Текст влево */
}

.privacy-container label {
    cursor: pointer;
    color: inherit;
    line-height: 1.2; /* Устанавливаем четкую высоту строки */
}

.privacy-container input[type="checkbox"] {
    flex-shrink: 0; /* Чтобы чекбокс никогда не сжимался */
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--accent);
    margin: 0;
    transform: translateY(-2px);
}

.privacy-container a {
    color: var(--accent);
    text-decoration: underline;
    transition: opacity 0.3s;
}

.privacy-container a:hover {
    opacity: 0.8;
}

/* Анимация встряски */
@keyframes shake-error {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Класс ошибки для контейнера политики */
.privacy-container.error {
    animation: shake-error 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* Подсветка текста и кастомный фокус на чекбокс */
.privacy-container.error label {
    color: #ff4d4d; /* Мягкий красный */
    text-shadow: 0 0 5px rgba(255, 77, 77, 0.3);
    transition: color 0.3s ease;
}

.privacy-container.error input[type="checkbox"] {
    outline: 2px solid #ff4d4d;
    outline-offset: 3px;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
}

@media (max-width: 880px) {
    .privacy-container {
        font-size: clamp(10px, 0.6rem, 20px);
    }
}

/* РАЗДЕЛ 11. ПРЕДЛОЖЛЕНИЕ ГАЙДА */
/* Превью Гайда */
.guide-preview-container {
    background: linear-gradient(145deg, #fefefe 0%, #f0f0f0 100%);
    border-radius: 15px;
    padding: 35px 20px;
    margin-bottom: 25px;
    position: relative;
    border: 2px dashed var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-bounce);
}

.pdf-icon-wrapper {
    position: relative;
    margin-bottom: 15px;
    animation: pdf-pulse 2s infinite ease-in-out;
}

@keyframes pdf-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.pdf-large-icon {
    font-size: clamp(50px, 15vw, 80px);
    color: var(--accent);
    filter: drop-shadow(0 10px 15px rgba(197, 160, 89, 0.2));
}

.pdf-size-tag {
    position: absolute;
    bottom: -5px;
    right: -10px;
    background: #333;
    color: #fff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

.guide-badge {
    position: absolute;
    z-index: 1;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: #fff;
    font-size: clamp(9px, 2vw, 11px);
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.guide-mockup-title {
    font-size: clamp(14px, 4vw, 17px);
    font-weight: 700;
    color: #2c3e50;
    max-width: 80%;
    line-height: 1.3;
}

/* Кнопка скачивания */
.download-guide-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: var(--accent);
    color: #fff;
    padding: clamp(15px, 4vw, 20px);
    font-size: clamp(16px, 4vw, 19px);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.35);
    margin-top: 10px;
}

.download-guide-btn:hover {
    background: var(--text-dark);
}

/* Эффект реалистичной обложки */
.guide-cover-wrapper {
    position: relative;
    margin-bottom: 20px;
    perspective: 1000px; /* Для 3D эффекта */
    transition: var(--transition-standard);
}

.guide-cover-img {
    width: clamp(120px, 30vw, 160px); /* Адаптивный размер */
    height: auto;
    border-radius: 4px 12px 12px 4px; /* Имитация корешка книги */
    box-shadow: 
        -5px 5px 15px rgba(0,0,0,0.2), 
        0 0 2px rgba(0,0,0,0.1);
    transform: rotateY(-10deg) rotateX(5deg); /* Слегка разворачиваем к пользователю */
    transition: transform 0.5s ease;
    display: block;
}

.guide-preview-container:hover .guide-cover-img {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05); /* Выпрямляется при наведении */
}

/* Корешок книги (блик) */
.guide-cover-wrapper::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(0,0,0,0.1) 100%);
    z-index: 2;
    border-radius: 4px 0 0 4px;
}

.pdf-size-tag {
    position: absolute;
    bottom: 5px;
    right: -15px;
    background: #27ae60; /* Зеленый цвет для "безопасного" размера */
    color: #fff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.trust-line {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.trust-item {
    font-size: clamp(9px, 1.1vw, 12px);
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.messenger-line {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #888;
}

.trust-item i {
    color: #27ae60;
}

/* Адаптивность для маленьких экранов */
@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    .guide-preview-container {
        padding: 10px;
    }
}

/* РАЗДЕЛ 12. ВИДЖЕТ ВОЗВРАТА К СМЕТЕ */
#active-smeta-widget {
    position: fixed;
    /* На ПК ставим выше виджета Телеграм (30px + 60px + 20px зазора) */
    bottom: 110px; 
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--accent); /* Фирменное золото */
    color: #fff !important;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.3);
    z-index: 9998; /* Чуть ниже основного ТГ виджета */
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: var(--transition-bounce);
    border: 2px solid #fff;
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.4);
    transition: all 0.3s ease;
    animation: asw 2s infinite;
}

/* Скрываем текст на ПК, оставляем только иконку для минимализма */
#active-smeta-widget span {
    display: none;
}

#active-smeta-widget i {
    font-size: 1.5rem;
}

#active-smeta-widget:hover {
    transform: scale(1.1) translateY(-5px);
    background: var(--side-bg); /* При наведении меняем на темный */
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Всплывающая подсказка как у ТГ виджета */
#active-smeta-widget::after {
    content: "Ваша смета";
    position: absolute;
    right: 80px;
    background: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

#active-smeta-widget:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Анимация пульсации */
@keyframes asw {
    0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(197, 160, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0); }
}

@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    #active-smeta-widget {
        white-space: nowrap;
        bottom: 15px; /* Чуть выше самого края */
        right: 50%;
        transform: translateX(50%); /* Центрируем */
        width: auto;
        height: auto;
        border-radius: 50px; /* Округлая форма */
        padding: 10px 20px;
        background: var(--side-bg); /* Темный фон как в side-nav */
        border: 1px solid var(--accent); /* Тонкая золотая рамка */
        box-shadow: 0 8px 20px rgba(0,0,0,0.4);
        display: none; /* Включается через JS */
    }

    #active-smeta-widget span {
        display: inline;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-left: 10px;
        color: #fff;
    }

    #active-smeta-widget i {
        font-size: 1rem;
        color: var(--accent); /* Золотая иконка */
    }

    #active-smeta-widget:hover {
        transform: translateX(50%) translateY(-2px);
        background: #000;
    }
    
    #active-smeta-widget::after {
        content: none;
    }
}

/* РАЗДЕЛ 13. ИКОНКИ СОЦСЕТЕЙ */
.share-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 20px); 
    background: #fdfdfd;
    padding: clamp(12px, 2vw, 20px);
    border-radius: 12px;
    border: 1px solid #eee;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* Разделительная линия */
.share-separator {
    width: 1px;
    height: 30px;
    background: #e0e0e0;
}

/* Текст "Поделиться этим расчетом" */
.share-label {
    /* Плавный шрифт от 11px до 13px */
    font-size: clamp(11px, 1vw + 8px, 13px);
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.2;
    max-width: min-content;
}

/* Контейнер иконок соцсетей */
.social-icons-group {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 20px);
}

/* Общие стили для иконок FontAwesome */
.s-icon-fa {
    /* Размер иконок плавно от 22px до 28px */
    font-size: clamp(22px, 2vw + 16px, 28px);
    text-decoration: none;
    transition: var(--transition-bounce);
}

/* Брендовые цвета иконок */
.s-icon-fa.max { color: #667eea; }
.s-icon-fa.tg { color: #229ED9; }
.s-icon-fa.wa { color: #25D366; }
.s-icon-fa.vk { color: #4C75A3; }

.s-icon-fa:hover {
    transform: scale(1.15) translateY(-3px);
    opacity: 0.8;
}

@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    .share-actions-row {
        flex-direction: column; /* Элементы встают друг под друга */
        padding: 20px;
        gap: 15px;
    }

    .share-separator {
        display: none; /* Убираем вертикальную черту в мобильной версии */
    }

    .share-label {
        width: 100%;
        text-align: center;
        margin-top: 5px;
        order: 2; /* Текст "Поделиться" идет вторым */
    }

    .social-icons-group {
        width: 100%;
        justify-content: center;
        order: 3; /* Иконки соцсетей в самом низу */
        padding-top: 10px;
        border-top: 1px solid #eee; /* Легкая черта для отделения соцсетей */
    }
}




/* РАЗДЕЛ Х. МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    
    /* Header: Скрываем лишнее, показываем иконки */
    .logo-desktop, .work-time, .phone-text {
        display: none !important;
    }

    .menu-toggle {
        display: flex;
        font-size: 1.4rem;
        cursor: pointer;
        z-index: 1100;
    }

    .phone-icon-circle {
        display: flex;
        width: 40px;
        height: 40px;
        background: #f8f8f8;
        color: var(--accent);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: inherit;
    }

    /* Слайдер: На весь экран мобильного */
    .content-slider {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Плавный свайп пальцем */
        scroll-snap-type: x mandatory; /* Примагничивание секций */
    }

    .step {
        width: 100vw;
        padding: 20px;
    }
    /* Уменьшаем внутренние поля текстового блока */
    .inner {
        padding: 0;
    }

    /* Стрелки: Смещаем вниз для удобства пальцев */
    .nav-arrow {
        top: auto;      /* Отменяем центрирование сверху */
        bottom: 0;
        width: 25px;
        height: 50px;
        opacity: 0.8; /* Делаем чуть прозрачнее, чтобы не «резали» контент */
        background: rgba(197, 160, 89, 0.8); /* Полупрозрачный золотой */
    }

    /* Если стрелки все равно мешают, можно сдвинуть их ближе к углам */
    .prev { left: 0px; }
    .next { right: 0px; }
    
    /* Кнопка обратного звонка */
    .callback-label { display: none; } /* Прячем текст на смартфонах */
    .callback-icon { 
        display: flex; 
        font-size: 1.2rem;
    }
    .callback-trigger {
        border: none;
        padding: 0;
        width: 40px;
        height: 40px;
        font-size: inherit;
        justify-content: center;
        background: #f8f8f8;
        border-radius: 50%;
    }
}

/* ОБЩИЕ АНИМАЦИИ */
/* Анимация пульсации */
@keyframes btn-pulse {
    0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(197, 160, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0); }
}

/* РАЗДЕЛ 6. МИНИ-КВИЗ */
.calc-presets {
    margin-bottom: 30px;
}

.quiz-contacts {
    background-color: #fff;
    padding: clamp(20px, 5vw, 40px);
    width: 100%;
    margin: 0 auto;
    max-width: 750px;
    border-radius: 20px;
    position: relative;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
}

.presets-title { 
    font-weight: 700; 
    margin-bottom: 12px; 
    font-size: 0.9rem; 
    color: #555; 
    text-transform: uppercase; 
    display: inline-flex;
    vertical-align: middle;
    justify-content: flex-end;
    width: 100%;
    gap: 8px; 
}

.preset-buttons { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
}

.btn-preset { 
    display: flex;
    position: relative;
    flex-direction: column;
    flex: 1;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 0.9rem;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-bounce);
    color: var(--text-dark);
}

.btn-preset span {
    white-space: nowrap;
}

.preset-params-box {
    background: var(--main-bg); 
    margin-bottom: 20px;
    padding: 25px; 
    border-radius: 12px; 
    border: 1px solid rgba(197, 160, 89, 0.3);
    animation: fadeIn 0.5s ease;
}

.PPM-res {
    border-radius: 12px 12px 0 0 !important;
    max-width: 900px;
    margin: 30px auto 0 auto;
    background: linear-gradient(180deg, #fefefe 0%, #f0f0f0 100%);
}

.field-with-button {
    display: flex;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 14px;
    padding: 6px;
    transition: var(--transition-base);
}

.field-with-button:hover {
    cursor: pointer;
    box-shadow: inset 0px 1px 5px #333;
}

.field-with-button:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.field-with-button input {
    flex: 1;
    border: none;
    border-radius: 10px;
    outline: none !important;
    padding: 10px;
    color: var(--text-dark);
    background: transparent;
    min-width: 0;
}

.btn-apply-quiz, .btn-apply-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;      /* Запрет сжатия */
    min-width: fit-content;
    background: var(--accent);
    color: #2c3e50;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 700;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-bounce);
    flex-shrink: 0;
}

.btn-apply-quiz:hover, .btn-apply-premium:hover {
    transform: translateX(-5px);;
}

.btn-apply-quiz:active, .btn-apply-premium:active {
    transform: translateX(0px);;
}

.options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

h2#quiz_title {
    font-size: clamp(1rem, 1.1vw, 1.1rem);
}

.options-grid > div {
    flex: 1 1 calc(50% - 15px); /* Две в ряд с учетом gap */
    min-width: 140px;
    box-sizing: border-box;
}

.options-grid.is-single-column > div {
    flex: 1 1 100%;
    max-width: 450px;
    margin: 0 auto;
}

.quiz-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
}

/* Единый стиль карточек квиза */
.quiz-card {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-height: 110px;
    box-sizing: border-box;
}

.btn-preset:hover, .quiz-card:hover {
    border-color: var(--accent);
    background: #fffaf2;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(197, 160, 89, 0.15);
}

/* Иконка внутри карточки */
.quiz-card .card-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.btn-preset:hover .icon-emodji, .quiz-card:hover .card-icon {
    transform: scale(1.2);
}

.quiz-card .card-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

/* Стили для ВЫБРАННОГО элемента квиза */
.btn-preset.active, .quiz-card.is-checked {
    background: #fffaf2;
    border-color: var(--accent);
}

.btn-preset.active::after, .quiz-card.is-checked::after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

/* Скрываем реальный инпут, но держим в доступе */
.quiz-card input {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}

.quiz-nav-container {
    display: flex;
    justify-content: flex-end; /* Кнопка справа на десктопе */
}

.btn-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    margin-left: 5px;
}

.icon-emodji {
    font-size: 32px;
    margin-bottom: 5px;
    transition: var(--transition-base);
}

@media (max-width: 880px), (max-height: 500px) and (orientation: landscape) {
    .btn-apply-premium span {
        display: none;
    }
    
    .preset-params-box {
        padding: 25px 15px; 
    }
    
    .btn-apply-premium svg {
        margin: 0;           /* Убираем лишние отступы у иконки */
        width: 18px;         /* Чуть увеличим иконку для удобства нажатия */
        height: 18px;
    }

    .field-with-button input {
        padding: 10px 10px;  /* Немного уменьшим отступы инпута на мобильных */
    }
    
    .quiz-nav-container {
        justify-content: center; /* Кнопка по центру на мобильных */
    }
    
    .btn-apply-quiz {
        width: 100%;
    }
}