/* ========== БАЗОВЫЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif !important;
}
/* Убираем любые лишние галочки в result-block */
.result-block .list-check + .list-check {
    display: none;
}

:root {
    --container-width: 640px;
    --section-gap: 40px;
    --gray-light: #7F7F7F;
    --border: #E0E0E0;
    --border-light: #eaeaea;
    --bg-gray: #f5f5f5;
    --text-color: #000000;
}

html, body {
    background: #ffffff;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.4;
    overflow-x: hidden;
}

/* ========== КОНТЕЙНЕРЫ ========== */
.page-wrap {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
}

.page-content {
    background: transparent;
    width: 100%;
}

.page-inner {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 56px 0 4rem 0;
}

.section {
    margin-bottom: var(--section-gap);
}

/* ========== ГЕРОЙ ========== */
.hero-title-desc {
    font-size: 27px;
    line-height: 32px;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: #000000;
}

.hero-title-desc .gray-text {
    color: #7F7F7F;
}

.hero-title-desc .gray-arrow svg path {
    fill: #7F7F7F;
}

/* ========== ЗАГОЛОВКИ ========== */
.title-main,
.title-block,
.title-qa,
.title-project {
    font-size: 27px;
    line-height: 32px;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: #000000;
}

.title-sub {
    font-size: 20px;
    line-height: 26px;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: #111111;
}

/* ========== ЛЕЙБЛЫ ========== */
.label-date,
.label-gray {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: var(--gray-light);
}

.label-date {
    margin-bottom: 10px;
}

/* ========== ТЕКСТ ========== */
.text-desc,
.text-list li,
.text-answer {
    font-size: 16px;
    line-height: 20px;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: var(--text-color);
}

.text-answer {
    line-height: 26px;
    font-size: 18px;
}

/* ========== СЕТКА ========== */
.grid-2cols {
    display: flex;
    gap: 72px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.grid-2cols:last-of-type {
    margin-bottom: var(--section-gap);
}

.col-left {
    width: 100px;
    flex-shrink: 0;
}

.col-right {
    width: 468px;
    flex-shrink: 0;
}

/* ========== СПИСКИ ========== */
.list-bullet,
.list-check {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-bullet li,
.list-check li {
    margin-bottom: 10px;
    padding-left: 10px;
    text-indent: -10px;
}

.list-bullet li::before {
    content: "•";
    display: inline-block;
    width: 6px;
    margin-right: 4px;
    color: var(--text-color);
}

.list-check li::before {
    content: "✓";
    display: inline-block;
    width: 6px;
    margin-right: 4px;
    color: var(--text-color);
}

/* ========== РЕЗУЛЬТАТ ========== */
.result-block {
    background: var(--bg-gray);
    padding: 20px;
    margin: 2rem 0;
}

.result-text {
    font-size: 27px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: -0.03em;
    color: #000000;
    margin-bottom: 24px;
}

/* ========== ТАБЛИЦЫ — ИСПРАВЛЕНО ========== */
.table-wrap {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0.8rem 0 1rem 0;
    display: table;
}

.table-wrap th,
.table-wrap td {
    border: 1px solid var(--border-light);
    padding: 12px 14px;
    vertical-align: top;
    text-align: left;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-color);
}

.table-wrap th {
    background: #fafafa;
    font-weight: 600;
    color: #111111;
}

/* ========== АККОРДЕОН ========== */
.accordion-input {
    display: none;
}

.accordion-label {
    cursor: pointer;
    display: block;
}

.accordion-icon {
    display: inline-block;
    font-size: 14px;
    transition: transform 0.2s;
}

.accordion-input:checked + .accordion-label .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-input:checked ~ .accordion-content {
    max-height: 8000px;
}

.accordion-label .title-block {
    margin-bottom: 16px;
}

/* ========== QA ========== */
.qa-list {
    margin: 1rem 0;
}

.qa-item {
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 0;
}

.qa-item:first-child {
    padding-top: 0;
}

.qa-item:last-child {
    border-bottom: none;
}

.qa-question {
    font-size: 27px;
    line-height: 32px;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: #000000;
    margin-bottom: 0.5rem;
}

.qa-answer {
    font-size: 18px;
    line-height: 26px;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: #000000;
}

/* ========== FIGMA ========== */
.figma-wrap {
    margin: 1rem 0;
    position: relative;
    background: #f5f5f5;
    border-radius: 8px;
    min-height: 450px;
}

.figma-wrap iframe {
    width: 100%;
    height: 450px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

/* Оверлей с кнопкой для мобильных */
.figma-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    cursor: pointer;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 8px;
}

.figma-overlay.hidden {
    display: none;
}

.figma-overlay svg {
    width: 48px;
    height: 48px;
    opacity: 0.6;
}

.figma-overlay p {
    font-size: 14px;
    color: #7F7F7F;
    margin: 0;
}

/* Стили кнопки — можно менять */
.figma-overlay button {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    background: #000000;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.figma-overlay button:hover {
    opacity: 0.8;
}

/* ========== СКРИНШОТЫ ========== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 1.2rem 0;
}

.gallery-item {
    cursor: pointer;
    border: 1px solid var(--border-light);
    background: #fafafa;
    transition: border 0.2s;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.2s;
}

.gallery-item:hover img {
    filter: grayscale(0%);
}

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.98);
    z-index: 1000;
    overflow-y: auto;
}

.lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    font-size: 24px;
    line-height: 1;
}

.lightbox-inner {
    width: 90%;
    max-width: 700px;
    margin: 64px auto 40px;
    padding: 0 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 16px;
}

.lightbox-img {
    max-width: 100%;
    max-height: 65vh;
    border: 1px solid var(--border-light);
    background: #fff;
}

.slider-prev,
.slider-next {
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    cursor: pointer;
    font-size: 20px;
}

.lightbox-caption {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.thumb-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.thumb-strip img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 1px solid var(--border-light);
    cursor: pointer;
    filter: grayscale(100%);
}

.thumb-strip img.active-thumb {
    border: 2px solid #111;
    filter: grayscale(0%);
}

/* ========== ДРУГИЕ ПРОЕКТЫ ========== */
.projects-wrap {
    margin-top: 0.5rem;
}

.project-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    cursor: pointer;
    transition: opacity 0.2s;
    gap: 16px;
}

.project-row:hover {
    opacity: 0.7;
}

.project-row span {
    font-size: 27px;
    line-height: 32px;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: #000000;
    flex: 1;
}

.project-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    stroke: #000000;
}

.project-divider {
    height: 1px;
    background: var(--border-light);
    width: 100%;
}

.projects-section {
    border-top: 1px solid var(--border-light);
    margin-top: 2rem;
    padding-top: 2rem;
}

.projects-section .title-project {
    color: #7F7F7F;
    margin-bottom: 1.5rem;
}

/* Стрелочка как в начале */
.project-arrow svg {
    width: 24px;
    height: 24px;
    display: block;
}

.project-arrow svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ========== КНОПКА НАВЕРХ ========== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: #FF3B00;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.scroll-top:hover {
    background: #000000;
}

.scroll-top svg {
    stroke: #ffffff;
    width: 24px;
    height: 24px;
}

/* ========== МИНИАТЮРА ========== */
.page-thumbnail {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
    transform: scale(0);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.34,1.2,0.55,1), opacity 0.25s ease, visibility 0.25s ease;
    transform-origin: center center;
    pointer-events: none;
}

.page-thumbnail.visible {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.page-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========== ЛОАДЕР ========== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 32px;
    height: 32px;
    position: relative;
}

.spinner-ray {
    position: absolute;
    width: 3px;
    height: 10px;
    background: #e0e0e0;
    border-radius: 0px;
    left: 50%;
    top: 4px;
    transform-origin: 50% 12px;
    margin-left: -1.5px;
    animation: rayColor 0.6s steps(8) infinite;
}

.spinner-ray:nth-child(1) { transform: rotate(0deg); animation-delay: 0s; }
.spinner-ray:nth-child(2) { transform: rotate(45deg); animation-delay: 0.03s; }
.spinner-ray:nth-child(3) { transform: rotate(90deg); animation-delay: 0.06s; }
.spinner-ray:nth-child(4) { transform: rotate(135deg); animation-delay: 0.09s; }
.spinner-ray:nth-child(5) { transform: rotate(180deg); animation-delay: 0.12s; }
.spinner-ray:nth-child(6) { transform: rotate(225deg); animation-delay: 0.15s; }
.spinner-ray:nth-child(7) { transform: rotate(270deg); animation-delay: 0.18s; }
.spinner-ray:nth-child(8) { transform: rotate(315deg); animation-delay: 0.21s; }

@keyframes rayColor {
    0%, 12.5% { background: #000000; }
    12.6%, 100% { background: #E0E0E0; }
}

#preloader.hide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 640px) {
    .page-inner {
        padding: 56px 20px 3rem 20px;
    }
    
    .grid-2cols {
        gap: 24px;
        flex-wrap: wrap;
    }
    
    .col-left,
    .col-right {
        width: 100%;
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
    
    .result-block {
        margin: 2rem 0;
        padding: 20px !important;
        width: 100%;
        margin-left: 0;
        border-radius: 0;
    }
    
    .result-text {
        margin-bottom: 0;
    }
    
    .gallery-grid {
        display: none;
    }
    
    .lightbox {
        display: none !important;
    }
    
    .figma-wrap {
        min-height: 300px;
    }
    
    .figma-wrap iframe {
        height: 300px;
    }
    
    .spinner-ray {
        animation-duration: 0.4s !important;
    }
    
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Таблицы с горизонтальным скроллом */
    .table-wrap {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-wrap th,
    .table-wrap td {
        padding: 8px 12px !important;
        white-space: normal;
        word-break: break-word;
        min-width: 120px;
    }
    
    .table-wrap::-webkit-scrollbar {
        height: 6px;
        -webkit-appearance: none;
    }
    
    .table-wrap::-webkit-scrollbar-track {
        background: var(--border-light);
        border-radius: 4px;
    }
    
    .table-wrap::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 4px;
    }
    
    /* Стрелка в других проектах не обрезается */
    .project-row {
        gap: 12px;
    }
    
    .project-arrow {
        width: 20px;
        height: 20px;
    }
}