:root {
    --bg-color: #f4f4f4;
    --text-color: #111;
    --active-color: #555;
    --font-main: 'Rubik', sans-serif;
    --hover-yellow: #ffeb7f;
    --hover-blue: #a0c4ff;
    --hover-green: #caffbf;
    --hover-red: #ffadad;
    --hover-gray: #e0e0e0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 100;
    background: var(--bg-color);
}

.nav-left {
    position: relative;
    width: 100px;
    height: 30px;
}

.btn-home {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
    position: absolute;
    left: 0;
    top: 0;
    transition: opacity 0.3s, transform 0.3s;
    cursor: pointer;
}

.nav-right {
    display: flex;
    gap: 15px;
}

.nav-pill {
    border: 2px solid #000;
    border-radius: 50px;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    color: #000;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-pill:hover {
    background: #000;
    color: #fff;
}

.chat-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background-color: #ff3b30;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border: 2px solid #fff;
    z-index: 10;
    pointer-events: none;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 100;
    background: var(--bg-color);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.footer-left {
    color: #000;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-right a {
    color: #000;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-right a:hover {
    opacity: 0.6;
}

.footer-right a:not(:last-child)::after {
    content: '|';
    margin-left: 16px;
    color: #ccc;
    font-weight: 400;
}

.footer-right a:not(:last-child)::after {
    content: '|';
    margin-left: 16px;
    color: #ccc;
    font-weight: 400;
}

/* Стили для текстовых/документальных страниц (privacy, info, payments, offer) */
.page-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 260px 20px 160px;
    box-sizing: border-box;
}

.page-content h1 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
}

.page-content h2 {
    margin: 22px 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.page-content h3 {
    margin: 18px 0 8px;
    font-size: 16px;
    font-weight: 600;
}

.page-content .meta {
    color: #666;
    margin: 0 0 18px;
    line-height: 1.5;
}

.page-content .lead {
    color: #666;
    line-height: 1.6;
    margin-bottom: 18px;
}

.page-content p {
    margin: 8px 0;
    line-height: 1.6;
}

.page-content ul {
    margin: 8px 0;
    padding-left: 18px;
}

.page-content li {
    margin: 6px 0;
    line-height: 1.6;
}

.page-content .box {
    border: 1px solid #1f1f1f;
    padding: 12px;
    margin: 14px 0;
    background: #fff;
}

.page-content .small {
    font-size: 13px;
    color: #666;
}

.page-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
}

.page-content a {
    color: inherit;
    text-decoration: underline;
}

.page-content a:hover {
    opacity: 0.7;
}

.page-content .section {
    margin-top: 32px;
}

.page-content .note {
    font-size: 14px;
    color: #666;
    margin: 12px 0 18px;
    line-height: 1.5;
}

.page-content .muted {
    color: #666;
}

/* Стили для таблицы цен */
.prices-table-wrap {
    overflow-x: auto;
    border: 1px solid #1f1f1f;
    margin: 20px 0;
}

.prices-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
    font-family: var(--font-main);
}

.prices-table-wrap th,
.prices-table-wrap td {
    border: 1px solid #1f1f1f;
    padding: 12px;
    vertical-align: top;
    text-align: left;
    font-family: var(--font-main);
}

.prices-table-wrap th {
    font-size: 14px;
    font-weight: 600;
    background-color: #f9f9f9;
}

.prices-table-wrap td {
    font-size: 14px;
    line-height: 1.45;
}

.prices-table-wrap td.price {
    white-space: nowrap;
    font-weight: 700;
}

.prices-table-wrap .small {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
    display: block;
}

.prices-error {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

.project-list {
    padding-top: 220px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
}

.project-error {
    padding: 220px 40px 80px 40px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.project-item {
    border-top: 1px solid #000;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background-color: var(--bg-color);
    margin-top: -45px;
    padding: 0;
    z-index: 1;
    opacity: 0;
}

.project-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    z-index: -1;
    pointer-events: auto;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-item:hover::after {
    transform: translateY(100%);
}

@keyframes slideUpEntrance {
    0% {
        opacity: 0;
        transform: translateY(1000px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-item.animating {
    animation: slideUpEntrance 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

.project-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-item:first-child {
    margin-top: 0;
}

.project-item:last-child {
    border-bottom: 1px solid #000;
}

.project-item:nth-child(5n+1) {
    --hover-color: var(--hover-yellow);
}

.project-item:nth-child(5n+2) {
    --hover-color: var(--hover-blue);
}

.project-item:nth-child(5n+3) {
    --hover-color: var(--hover-green);
}

.project-item:nth-child(5n+4) {
    --hover-color: var(--hover-red);
}

.project-item:nth-child(5n+5) {
    --hover-color: var(--hover-gray);
}

.project-item:hover {
    transform: translateY(-20px);
    background-color: var(--hover-color);
    z-index: 50;
}

.project-item.active {
    margin-top: 20px;
    margin-bottom: 20px;
    z-index: 40;
    background-color: var(--hover-color);
    transform: none;
    border-bottom: 1px solid #000;
}

.project-header {
    padding: 30px 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
}

.project-title {
    font-size: clamp(30px, 5vw, 80px);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    transition: color 0.3s, transform 0.3s;
    display: inline;
}

.project-tag {
    border: 1px solid #000;
    border-radius: 50px;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 1;
    transform: none;
    transition: all 0.3s;
    margin-left: 15px;
    display: inline-block;
    position: relative;
    vertical-align: top;
}

.project-item:hover .project-tag {
    opacity: 1;
    transform: none;
}

.project-item:hover .project-title {
    color: #000;
    padding-left: 20px;
}

.project-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.content-inner {
    padding: 20px 40px 60px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-image-large {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    margin: 0;
}

.project-desc {
    font-size: 24px;
    line-height: 1.4;
    max-width: 800px;
    margin-bottom: 40px;
    white-space: pre-line;
}

.project-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    width: 100%;
}

.detail-block h3 {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    display: inline-block;
    letter-spacing: 1px;
}

.detail-block p {
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

.task-block p {
    font-style: italic;
}

.advantages-block ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.advantages-block li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.5;
}

.advantages-block li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 800;
}

@media (min-width: 900px) {
    .project-details-grid {
        grid-template-columns: 1fr 2fr;
        gap: 60px;
    }

    .task-block {
        grid-column: 1;
    }

    .solution-block {
        grid-column: 2;
    }

    .advantages-block {
        grid-column: 1 / -1;
        margin-top: 20px;
    }
}

.project-item.active .project-header {
    background-color: transparent;
}

.project-item.active .project-title {
    font-weight: 800;
}

.project-item.active .project-content {
    max-height: 5000px;
}

.project-item.active .project-tag {
    opacity: 1;
    transform: translateX(0);
    background: #000;
    color: #fff;
}

body.project-open .project-item:not(.active) {
    opacity: 0.3;
}

.title-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.hover-preview-inline {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    margin-left: 20px;
    height: clamp(120px, 15vw, 200px);
    width: auto;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 100;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

body:not(.project-open) .project-item:hover .hover-preview-inline {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
    }

    .nav-left {
        width: 100%;
        margin-bottom: 5px;
    }

    .nav-right {
        width: 100%;
        justify-content: flex-start;
    }

    .project-title {
        font-size: 36px;
    }

    .project-image-large {
        height: 250px;
    }
}

.chat-content-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px 40px 40px;
    gap: 60px;
    margin-top: 160px;
}

.chat-instructions {
    max-width: 400px;
    text-align: left;
    color: #000;
}

.chat-instructions h2 {
    font-size: 40px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 30px;
    line-height: 1;
}

.chat-instructions p {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.chat-invite {
    font-weight: 800;
    margin-top: 40px;
}

@media (max-width: 1000px) {
    .chat-content-wrapper {
        flex-direction: column;
        gap: 30px;
        justify-content: flex-start;
    }

    .chat-instructions {
        max-width: 600px;
        text-align: center;
        margin-bottom: 20px;
    }

    .chat-instructions h2 {
        font-size: 30px;
        margin-bottom: 15px;
    }

    .chat-instructions p {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .chat-invite {
        display: none;
    }

    #mxbz-chat-container {
        height: 600px;
    }
}

#mxbz-chat-container {
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 800px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 10px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-main);
}

.mxbz-chat-header {
    background: var(--hover-green);
    color: #000;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #000;
}

.mxbz-bot-avatar {
    width: 44px;
    height: 44px;
    background: #000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mxbz-header-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
}

.mxbz-header-subtitle {
    margin: 4px 0 0 0;
    font-size: 14px;
    opacity: 0.6;
    font-weight: 600;
}

.mxbz-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--hover-yellow);
}

.mxbz-messages::-webkit-scrollbar {
    width: 6px;
}

.mxbz-messages::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 3px;
}

.mxbz-welcome {
    text-align: center;
    color: #000;
    padding: 40px 20px;
}

.mxbz-welcome-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.mxbz-welcome-icon svg path {
    fill: #000;
}

.mxbz-welcome h4 {
    color: #000;
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
}

.mxbz-welcome p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.mxbz-message {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mxbz-message.user {
    justify-content: flex-end;
}

.mxbz-message-content {
    max-width: 75%;
    padding: 15px 20px;
    border-radius: 10px;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid #000;
}

.mxbz-message.bot .mxbz-message-content {
    background: #fff;
    color: #000;
    border-bottom-left-radius: 0;
    box-shadow: none;
}

.mxbz-message.user .mxbz-message-content {
    background: #000;
    color: #fff;
    border-bottom-right-radius: 0;
}

.mxbz-typing {
    padding: 0 20px 12px 20px;
    background: var(--bg-color);
}

.mxbz-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    border-bottom-left-radius: 0;
    border: 1px solid #000;
    box-shadow: none;
}

.mxbz-typing-dots {
    display: flex;
    gap: 4px;
}

.mxbz-typing-dots span {
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.mxbz-typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.mxbz-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.mxbz-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.mxbz-typing-text {
    font-size: 13px;
    color: #000;
    font-weight: 600;
}

.mxbz-input-area {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #000;
    display: flex;
    gap: 12px;
}

#mxbz-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #000;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
    font-family: var(--font-main);
}

#mxbz-input:focus {
    border-color: #000;
    background: #f4f4f4;
}

#mxbz-send {
    width: 44px;
    height: 44px;
    background: #000;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

#mxbz-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#mxbz-send:active {
    transform: scale(0.95);
}

#mxbz-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.about-page {
    padding-top: 160px;
    padding-bottom: 120px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.about-text h1 {
    font-size: 60px;
    margin-top: 0;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 30px;
}

.about-text h3 {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 30px;
    margin-bottom: 15px;
}

.about-text p {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.about-images {
    display: grid;
    gap: 20px;
}

.about-images img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

@media (max-width: 768px) {
    .about-page {
        grid-template-columns: 1fr;
    }

    .about-text h1 {
        font-size: 40px;
    }
}

.privacy-frame {
    width: 100%;
    height: calc(100vh - 160px);
    border: none;
    margin-top: 140px;
    display: block;
}

/* Generic content page layout - use for privacy, terms, etc */
main.page-content {
    padding: 260px 60px 160px 60px;
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 20px;
    box-sizing: border-box;
}

/* Legacy support */
main.privacy-page {
    padding: 260px 60px 160px 60px;
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 20px;
    box-sizing: border-box;
}

main.page-content h1,
main.privacy-page h1 {
    font-size: 60px;
    margin: 0 0 32px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

main.page-content h3,
main.privacy-page h3 {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 30px 0 15px 0;
}

main.page-content p,
main.privacy-page p {
    margin: 0 0 16px 0;
    font-size: 20px;
    line-height: 1.6;
}

main.page-content ul,
main.privacy-page ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
}

main.page-content li,
main.privacy-page li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1.6;
}

main.page-content li::before,
main.privacy-page li::before {
    content: '—';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 800;
}

main.page-content .privacy-section+.privacy-section,
main.privacy-page .privacy-section+.privacy-section {
    margin-top: 20px;
}

@media (max-width: 900px) {

    main.page-content,
    main.privacy-page {
        padding: 220px 32px 140px 32px;
        font-size: 18px;
    }

    main.page-content h1,
    main.privacy-page h1 {
        font-size: 44px;
        margin-bottom: 24px;
    }

    main.page-content h3,
    main.page-content p,
    main.page-content li,
    main.privacy-page h3,
    main.privacy-page p,
    main.privacy-page li {
        font-size: 18px;
    }
}

@media (max-width: 600px) {

    main.page-content,
    main.privacy-page {
        padding: 200px 20px 120px 20px;
        font-size: 16px;
    }

    main.page-content h1,
    main.privacy-page h1 {
        font-size: 34px;
    }

    main.page-content h3,
    main.page-content p,
    main.page-content li,
    main.privacy-page h3,
    main.privacy-page p,
    main.privacy-page li {
        font-size: 16px;
    }
}

.privacy-pre {
    white-space: pre-wrap;
    font-family: var(--font-main);
    font-size: 20px;
    line-height: 1.6;
    margin: 0;
}