/* VKmebel — страницы проектов (/proekty/). Подключается только на этих страницах.
   Цвета, шрифты и кнопки берутся из css/style.css. */

.proj-page {
    padding-top: calc(var(--header-h) + clamp(32px, 6vw, 64px));
}

.proj-draft {
    margin-bottom: 24px;
    padding: 10px 14px;
    border: 1px dashed var(--accent-line);
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 28px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.crumbs a:hover {
    color: var(--accent);
}

.crumbs [aria-current] {
    color: var(--text);
}

.crumbs__sep {
    opacity: 0.5;
}

.proj-title {
    font-size: clamp(30px, 5vw, 56px);
    margin-block: 14px 22px;
    max-width: 960px;
}

.proj-lead {
    max-width: 700px;
    padding-left: 16px;
    border-left: 2px solid var(--accent);
    font-size: 16px;
    line-height: 1.65;
}

.proj-meta {
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.proj-meta a {
    color: var(--accent);
}

.proj-meta a:hover {
    text-decoration: underline;
}

.proj-section {
    padding-block: clamp(36px, 6vw, 72px) 0;
}

.proj-section--last {
    padding-bottom: clamp(56px, 8vw, 104px);
}

.proj-h2 {
    font-size: clamp(22px, 3vw, 32px);
    margin-bottom: 22px;
}

/* Галерея: колонки, чтобы вертикальные и горизонтальные фото не обрезались */
.proj-gallery {
    columns: 3 260px;
    column-gap: 12px;
}

.proj-gallery figure {
    break-inside: avoid;
    margin: 0 0 12px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface);
}

.proj-gallery a {
    display: block;
}

.proj-gallery img {
    width: 100%;
    height: auto;
}

.proj-gallery figcaption {
    padding: 10px 12px 12px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted);
}

.proj-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
}

.proj-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 12px 22px;
}

.proj-facts dt {
    padding-top: 3px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.proj-facts dd {
    margin: 0;
    line-height: 1.55;
}

.proj-done {
    list-style: none;
    counter-reset: done;
}

.proj-done li {
    position: relative;
    counter-increment: done;
    padding: 14px 0 14px 46px;
    border-top: 1px solid var(--border);
    line-height: 1.55;
}

.proj-done li:last-child {
    border-bottom: 1px solid var(--border);
}

.proj-done li::before {
    content: counter(done, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.proj-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(24px, 4vw, 48px);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.proj-cta__title {
    font-size: clamp(22px, 3vw, 32px);
}

.proj-cta__text {
    max-width: 560px;
    margin-top: 10px;
    color: var(--text-muted);
    line-height: 1.6;
}

.proj-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Карточки проектов (хаб и «Другие проекты») */
.proj-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 16px;
}

.proj-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
}

.proj-card:hover {
    border-color: var(--accent-line);
}

.proj-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.proj-card__body {
    padding: 16px 18px 20px;
}

.proj-card__cat {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}

.proj-card__title {
    margin-top: 8px;
    font-size: 18px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.proj-card:hover .proj-card__title {
    color: var(--accent);
}

.proj-card__text {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .proj-info {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .proj-facts {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .proj-facts dd {
        margin-bottom: 14px;
    }

    .proj-cta__actions,
    .proj-cta__actions .btn {
        width: 100%;
        justify-content: center;
    }
}
