/* Общие стили сайта, вынесенные из css/pages/ на втором этапе технического рефакторинга. */

@font-face {
            font-family: "Playfair Display";
            font-style: normal;
            font-weight: 400;
            font-display: swap;
            src: url("../fonts/playfair-display-v40-cyrillic_latin-regular.woff2") format("woff2");
        }

@font-face {
            font-family: "Playfair Display";
            font-style: normal;
            font-weight: 700;
            font-display: swap;
            src: url("../fonts/playfair-display-v40-cyrillic_latin-700.woff2") format("woff2");
        }

@font-face {
            font-family: "Roboto";
            font-style: normal;
            font-weight: 300;
            font-display: swap;
            src: url("../fonts/roboto-v51-cyrillic_latin-300.woff2") format("woff2");
        }

@font-face {
            font-family: "Roboto";
            font-style: normal;
            font-weight: 400;
            font-display: swap;
            src: url("../fonts/roboto-v51-cyrillic_latin-regular.woff2") format("woff2");
        }

@font-face {
            font-family: "Roboto";
            font-style: normal;
            font-weight: 500;
            font-display: swap;
            src: url("../fonts/roboto-v51-cyrillic_latin-500.woff2") format("woff2");
        }

@font-face {
            font-family: "Roboto";
            font-style: normal;
            font-weight: 700;
            font-display: swap;
            src: url("../fonts/roboto-v51-cyrillic_latin-700.woff2") format("woff2");
        }

:root {
            --bg: #faf9f6;
            --dark: #1f1f1f;
            --dark-soft: #272421;
            --gold: #b89778;
            --gold-hover: #a67f5f;
            --text: #333;
            --muted: #5f5a55;
            --line: rgba(184,151,120,0.28);
            --shadow-soft: 0 14px 38px rgba(31,31,31,0.08);
            --white: #ffffff;
            scroll-behavior: smooth;
        }

html {
            overflow-y: scroll;
        }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
            font-family: "Roboto", sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            text-rendering: optimizeLegibility;
        }

a {
            color: var(--gold);
            text-decoration: none;
        }

a:hover {
            color: var(--gold-hover);
        }

.container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
        }

header {
            background: rgba(31, 31, 31, 0.96);
            padding: 10px 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 10px 28px rgba(0,0,0,0.18);
            backdrop-filter: blur(10px);
        }

.header-inner {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

.logo-link:hover { opacity: 0.8; }

.logo-link:focus-visible,
.nav-btn:focus-visible,
.header-phone:focus-visible,
.btn-main:focus-visible,
.faq-preview-link:focus-visible,
.bot-choice:focus-visible,
.bot-submit:focus-visible,
.callback-bt:focus-visible {
            outline: 2px solid var(--gold);
            outline-offset: 4px;
        }

.logo-wrapper {
            display: flex;
            flex-direction: column;
            line-height: 0.9;
        }

.logo {
            font-family: "Playfair Display", serif;
            font-size: 26px;
            font-weight: 700;
            color: var(--gold);
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }

.logo-subtext {
            font-family: "Playfair Display", serif;
            font-weight: 400; 
            font-size: 10px;
            color: var(--white);
            text-transform: uppercase;
            letter-spacing: 5px; 
            margin-top: 5px;
            opacity: 0.8;
        }

nav ul { display: flex; gap: 12px; list-style: none; align-items: center; }

.nav-btn {
            text-decoration: none;
            border: 1px solid var(--gold);
            padding: 8px 16px;
            border-radius: 999px;
            color: var(--white) !important;
            transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
            font-weight: 400;
            font-size: 0.85rem;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-sizing: border-box;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 36px;
            line-height: 1;
            vertical-align: middle;
        }

.nav-btn:hover,
.nav-btn.active {
            transform: translateY(-1px);
        }

.header-inner .header-phone {
            min-height: 36px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 8px !important;
            padding: 8px 16px !important;
            border: 1px solid var(--gold) !important;
            border-radius: 999px !important;
            color: var(--white) !important;
            background: transparent !important;
            text-decoration: none !important;
            font-weight: 400 !important;
            font-size: 0.85rem !important;
            line-height: 1 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.5px !important;
            margin-left: 0 !important;
            white-space: nowrap !important;
            box-sizing: border-box !important;
            transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease !important;
        }

.header-inner .header-phone svg {
            fill: currentColor !important;
            flex-shrink: 0;
        }

.header-inner .header-phone:hover {
            background: var(--gold) !important;
            color: var(--dark) !important;
            transform: translateY(-1px);
        }

.burger {
            display: none;
            flex-direction: column;
            gap: 5px;
            cursor: pointer;
            z-index: 1001;
        }

.burger span {
            width: 25px;
            height: 3px;
            background: var(--gold);
            transition: 0.3s;
        }

.nav-link { transition: 0.3s; }

.nav-link:hover { text-decoration: underline !important; opacity: 0.9; }

.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-bottom: 40px; }

footer h4 { color: var(--gold); font-family: "Playfair Display", serif; margin-bottom: 20px; font-size: 1.25rem; }

.callback-bt {
            position: fixed;
            bottom: 25px;
            right: 25px;
            background: var(--gold);
            border-radius: 50px;
            padding: 12px 25px;
            color: white;
            cursor: pointer;
            box-shadow: 0 12px 28px rgba(0,0,0,0.22);
            z-index: 1001;
            transition: 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

.callback-bt:hover { transform: scale(1.05); background: var(--gold-hover); }

.callback-bt span { font-weight: 500; text-transform: uppercase; font-size: 14px; letter-spacing: 0.5px; }

.form-container {
            display: none;
            opacity: 0;
            transition: opacity 0.4s ease;
            position: fixed;
            bottom: 85px;
            right: 25px;
            width: 330px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 18px 50px rgba(0,0,0,0.26);
            z-index: 1002;
            overflow: hidden;
            border: 1px solid var(--gold);
        }

.btn-main {
            min-height: 48px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px !important;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
        }

.card,
.portfolio-card,
.service-compact-card,
.quiet-panel,
.mini-faq,
.contacts-info,
.info-block,
.portfolio-cta,
.services-final-cta {
            box-shadow: var(--shadow-soft) !important;
        }

.card,
.portfolio-card,
.service-compact-card,
.quiet-panel,
.mini-faq,
.installation-card,
.contacts-info {
            border-color: var(--line) !important;
        }

.card:hover,
.portfolio-card:hover,
.service-compact-card:hover,
.installation-card:hover {
            transform: translateY(-5px);
        }

.section-title {
            letter-spacing: 0;
        }

.section-title::after {
            border-radius: 999px;
        }

.mini-faq-item,
.faq-preview-list li,
.contact-item,
.work-step {
            transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
        }

.mini-faq-item:hover,
.contact-item:hover,
.work-step:hover {
            border-color: rgba(184,151,120,0.52);
            background: #fff;
        }

.mini-faq-item summary {
            display: flex;
            justify-content: space-between;
            gap: 18px;
        }

.mini-faq-item summary::after {
            float: none !important;
            flex-shrink: 0;
        }

input,
textarea,
button,
select {
            font: inherit;
        }

::selection {
            background: rgba(184,151,120,0.28);
        }

.form-header { background: var(--dark); color: var(--gold); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }

.form-header h4 { font-family: "Playfair Display", serif; margin: 0; font-size: 1.1rem; }

.close-form { cursor: pointer; font-size: 24px; line-height: 1; }


@media (max-width: 1024px) {
            .header-inner {
                gap: 12px;
            }

            .header-phone {
                padding: 8px 12px;
                font-size: 0.85rem;
                margin-left: 0;
            }

            .form-container {
                width: min(340px, calc(100vw - 30px));
                right: 15px;
                bottom: 85px;
            }
        }

@media (max-width: 480px) {
            .container {
                width: calc(100% - 24px);
            }

            .header-inner {
                gap: 8px;
            }

            .logo {
                font-size: 16px;
            }

            .logo-subtext {
                letter-spacing: 2px;
            }

            .header-phone {
                font-size: 0.85rem;
                padding: 6px 8px;
                gap: 5px;
                flex-shrink: 0;
            }

            .header-phone svg {
                width: 12px;
                height: 12px;
                flex-shrink: 0;
            }

            section,
            .portfolio-section {
                padding-top: 50px;
                padding-bottom: 50px;
            }

            .hero,
            .hero-mini {
                padding-top: 80px;
            }

            .section-title {
                font-size: 28px;
            }

            .grid,
            .portfolio-grid,
            .retouch-grid,
            .footer-grid,
            .contacts-wrapper {
                grid-template-columns: 1fr !important;
                gap: 24px;
            }

            .portfolio-card,
            .card,
            .service-detail,
            .info-block,
            .portfolio-cta {
                width: 100%;
                overflow: hidden;
            }
        }

/* Cookie notice */
#cookie-notice {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(26, 26, 26, 0.95);
    color: #ffffff;
    padding: 12px 20px;
    border: 1px solid #c5a059;
    border-radius: 50px;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#cookie-notice span {
    margin-right: 15px;
}

#cookie-notice button {
    background: #c5a059;
    color: #000;
    border: none;
    padding: 6px 18px;
    cursor: pointer;
    border-radius: 20px;
    font-weight: bold;
    white-space: nowrap;
    transition: background 0.3s ease;
}

#cookie-notice button:hover {
    background: #e2bd76;
}

@media (max-width: 600px) {
    #cookie-notice {
        border-radius: 10px;
        bottom: 10px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    #cookie-notice button {
        margin-top: 10px;
        width: 100%;
    }
}


/* Dropdown for existing "Работы" navigation item */
.nav-dropdown {
    position: relative;
}

/* Общая база стиля подменю для всех типов устройств */
.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--dark);
    border: 1px solid var(--gold);
    border-radius: 4px;
    z-index: 1002;
    overflow: hidden;
}

.nav-submenu a {
    display: block;
    padding: 11px 16px; 
    color: var(--white) !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: background 0.3s ease, color 0.3s ease;
}

.nav-submenu a:hover,
.nav-submenu a.active {
    background: var(--gold);
    color: var(--dark) !important;
}


/* 1. ИЗОЛИРОВАННАЯ ЛОГИКА ДЛЯ КОМПЬЮТЕРОВ И НОУТБУКОВ */
@media (min-width: 1025px) {
    .nav-submenu {
        position: absolute;
        top: calc(100% + 7px); 
        left: 50%;
        transform: translateX(-50%);
        width: max-content;

        /* Плавное проявление и таяние вместо резкого display: block/none */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    /* Невидимый мостик-переходник для удержания ховера мыши */
    .nav-submenu::before {
        content: "";
        position: absolute;
        top: -25px; 
        left: -15px;
        width: calc(100% + 30px); 
        height: 25px;
        background: transparent;
    }

    /* Активация меню по наведению только на ПК */
    .nav-dropdown:hover .nav-submenu,
    .nav-dropdown:focus-within .nav-submenu {
        opacity: 1;
        visibility: visible;
    }
}


/* 2. ИЗОЛИРОВАННАЯ ЛОГИКА ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ */
@media (max-width: 1024px) {
    .nav-dropdown {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-submenu {
        /* Встраиваем в обычный поток элементов списка бургер-меню */
        position: static;
        width: 100%;
        background: transparent;
        border: none;
        padding-top: 6px;
    }

    .nav-submenu a {
        padding: 10px 0;
        font-size: 0.85rem;
        color: var(--white) !important;
        opacity: 0.85; /* Слегка приглушаем подпункт для лучшей иерархии */
        white-space: normal; /* Разрешаем аккуратный перенос текста на ультра-маленьких экранах */
        text-align: center;
    }

    .nav-submenu a:hover {
        background: transparent;
        color: var(--gold) !important;
        opacity: 1;
    }
}
/* Интеллектуальный консультант */
.bot-container {
    width: 380px;
    max-width: calc(100vw - 30px);
}

.bot-chat {
    padding: 12px;
    background: #fff;
}

.bot-messages {
    min-height: 82px;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
    scrollbar-width: thin;
}

.bot-msg {
    max-width: 88%;
    padding: 9px 12px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(7px);
    animation: botFadeIn .28s ease forwards;
    box-shadow: 0 6px 18px rgba(31,31,31,0.06);
}

.bot-msg.bot {
    background: #f4f1ec;
    color: var(--dark);
    border: 1px solid rgba(184,151,120,0.25);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

.bot-msg.user {
    background: var(--dark);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.bot-typing {
    width: fit-content;
    margin: 10px 0 0;
    padding: 10px 13px;
    border-radius: 16px;
    border-bottom-left-radius: 6px;
    background: #f4f1ec;
    border: 1px solid rgba(184,151,120,0.25);
}

.bot-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    border-radius: 50%;
    background: var(--gold);
    opacity: .45;
    animation: botTyping 1s infinite ease-in-out;
}

.bot-typing span:nth-child(2) { animation-delay: .15s; }
.bot-typing span:nth-child(3) { animation-delay: .3s; }

.bot-actions {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.bot-actions.active {
    display: flex;
    animation: botFadeIn .25s ease forwards;
}

.bot-choice {
    border: 1px solid rgba(184,151,120,0.45);
    background: #fff;
    color: var(--dark);
    border-radius: 999px;
    padding: 11px 14px;
    cursor: pointer;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    text-align: left;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.bot-choice:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    transform: translateY(-1px);
}

.bot-step-form {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 8px;
    animation: botFadeIn .25s ease forwards;
}

.bot-step-form[hidden], .bot-photo-form[hidden], .bot-file-label[hidden], .bot-file-list[hidden], #botStepInput[hidden], #botStepTextarea[hidden] {
    display: none !important;
}

.bot-step-form input[type="text"],
.bot-step-form input[type="email"],
.bot-step-form textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid rgba(31,31,31,0.14);
    border-radius: 12px;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    background: #fff;
    resize: none;
}


.bot-step-form.is-textarea {
    position: relative;
}

.bot-step-form.is-textarea textarea {
    min-height: 50px;
    max-height: 126px;
    padding: 13px 56px 13px 13px;
    resize: none;
    overflow-y: hidden;
}

.bot-step-form.is-textarea .bot-submit {
    position: absolute;
    right: 7px;
    bottom: 7px;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(184,151,120,0.24);
}

.bot-step-form.is-textarea .bot-submit::before {
    content: "";
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.4 20.4 21.2 12 3.4 3.6 3 10.1l10.7 1.9L3 13.9z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.4 20.4 21.2 12 3.4 3.6 3 10.1l10.7 1.9L3 13.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.bot-step-form.is-textarea .bot-submit:hover {
    transform: none;
}

.bot-step-form input:focus,
.bot-step-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184,151,120,0.16);
}

.bot-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px dashed rgba(184,151,120,0.75);
    border-radius: 12px;
    background: #faf9f6;
    color: var(--dark);
    cursor: pointer;
    font-size: 14px;
    transition: .2s ease;
}

.bot-file-label:hover {
    background: #f4f1ec;
    border-color: var(--gold);
}

.bot-file-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.bot-file-list {
    font-size: 12px;
    color: #666;
    padding: 0 2px;
}

.bot-submit {
    width: 100%;
    border: none;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    padding: 12px 16px;
    cursor: pointer;
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s ease, transform .2s ease;
}

.bot-submit:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
}

.bot-link {
    display: inline-block;
    margin-top: 7px;
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
}

.bot-link:hover { text-decoration: underline; }

@keyframes botFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes botTyping {
    0%, 80%, 100% { transform: translateY(0); opacity: .35; }
    40% { transform: translateY(-3px); opacity: .9; }
}

@media (max-width: 480px) {
    .bot-container { right: 10px; left: 10px; width: auto; bottom: 80px; }
    .bot-chat { padding: 10px; }
    .bot-messages { min-height: 76px; max-height: 220px; }
}

.bot-nav-actions {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    text-align: center;
}

.bot-nav-actions[hidden] {
    display: none !important;
}

.bot-nav-btn {
    border: none;
    background: transparent;
    color: rgba(31,31,31,0.62);
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 5px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bot-nav-btn:hover {
    color: var(--gold);
}

.bot-legal-notice {
    margin-top: 4px;
    padding: 0 8px 2px;
    color: rgba(31,31,31,0.48);
    font-family: "Roboto", sans-serif;
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
}

.bot-legal-notice a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bot-legal-notice a:hover {
    color: var(--gold);
}

.bot-msg-action {
    cursor: pointer;
    border-color: rgba(184,151,120,0.55);
}

.bot-msg-action:hover {
    background: #f4f1ec;
}

.bot-live-btn {
    color: var(--gold);
    font-weight: 700;
}

.bot-offhours-notice {
    width: 100%;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid rgba(184,151,120,0.28);
    border-radius: 14px;
    background: #faf9f6;
    color: rgba(31,31,31,0.78);
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
}

.bot-offhours-notice[hidden] {
    display: none !important;
}

.bot-offhours-btn {
    width: 100%;
    margin-top: 10px;
    border: none;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 13px;
}

.bot-offhours-btn:hover {
    background: var(--gold-hover);
}
