/* AVE Design Studio — раздел «Продакшн»: /foto/, /foto/<направление>.php, /videoproduction/.
   Опирается на blog.css (bl-*, vd-*) и uslugi.css (us-*). Просмотр фото — js/production.js. */

.pr-sec .us-head { margin-bottom: 26px; }
.pr-head { margin-top: 30px; }

/* ---------- направления (хаб /foto/) ---------- */
.pr-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.pr-cat > a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--bl-line); border-radius: var(--bl-radius); background: #fff; color: var(--bl-text); text-decoration: none; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.pr-cat > a:hover, .pr-cat > a:focus-visible { border-color: rgba(200, 0, 0, .35); box-shadow: 0 22px 48px rgba(23, 24, 29, .12); transform: translateY(-3px); color: var(--bl-text); text-decoration: none; }
.pr-cat > a:focus-visible { outline: 2px solid var(--bl-red); outline-offset: 3px; }
.pr-cat__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bl-soft); }
.pr-cat__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pr-cat > a:hover .pr-cat__img img { transform: scale(1.04); }
.pr-cat__n { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(23, 24, 29, .82); color: #fff; font-size: 12px; font-weight: 700; }
.pr-cat__b { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 20px; }
.pr-cat__t { margin-bottom: 8px; color: var(--bl-ink); font-size: 19px; font-weight: 800; line-height: 1.3; }
.pr-cat__x { margin-bottom: 14px; font-size: 14.5px; line-height: 1.6; }
.pr-cat__go { margin-top: auto; color: var(--bl-red); font-size: 14px; font-weight: 700; }

.pr-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- переключатель направлений ---------- */
.pr-nav, .pr-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.pr-nav__video { border-style: dashed; }
button.bl-chip { cursor: pointer; }
.pr-filter { margin-bottom: 10px; }

/* ---------- галерея: ровные ряды без обрезки ---------- */
.pr-gal { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-gal::after { content: ''; flex-grow: 9999; }
.pr-it { position: relative; flex-grow: var(--r); flex-basis: calc(var(--r) * 230px); max-width: 100%; margin: 0; border-radius: 10px; overflow: hidden; background: var(--bl-soft); }
.pr-it > a { display: block; aspect-ratio: var(--r); cursor: zoom-in; }
.pr-it img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s; }
.pr-it > a:hover img, .pr-it > a:focus-visible img { transform: scale(1.03); }
.pr-it > a:focus-visible { outline: 3px solid var(--bl-red); outline-offset: -3px; }
.pr-it figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.35; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; pointer-events: none; }
.pr-it:hover figcaption, .pr-it:focus-within figcaption { opacity: 1; transform: none; }

.pr-objects { margin: 26px 0 0; padding: 18px 20px; border: 1px solid var(--bl-line); border-radius: var(--bl-radius); background: #fff; }
.pr-objects b { display: block; margin-bottom: 10px; color: var(--bl-ink); font-size: 14px; font-weight: 800; }
.pr-objects ul { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.pr-objects li { padding: 5px 11px; border-radius: 999px; background: var(--bl-soft); color: var(--bl-text); font-size: 13px; font-weight: 600; }
.pr-svc { margin: 22px 0 0; color: var(--bl-muted); font-size: 15px; line-height: 1.6; }
.pr-svc a { color: var(--bl-red); font-weight: 700; }

/* ---------- видео ---------- */
.pr-vteaser .vd-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pr-videos .vd-card[hidden] { display: none; }
.pr-casebar { margin: -8px 0 20px; padding: 12px 16px; border-left: 3px solid var(--bl-red); border-radius: 0 10px 10px 0; background: var(--bl-soft); color: var(--bl-text); font-size: 14.5px; line-height: 1.55; }
.pr-casebar span { color: var(--bl-muted); font-weight: 700; }
.pr-casebar a { color: var(--bl-ink); font-weight: 700; }
.pr-casebar a:hover { color: var(--bl-red); }

.pr-mini { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.pr-mini a { display: flex; flex-direction: column; gap: 4px; color: var(--bl-text); text-decoration: none; }
.pr-mini img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: 6px; transition: transform .3s; }
.pr-mini a:hover img { transform: translateY(-2px); }
.pr-mini b { color: var(--bl-ink); font-size: 14px; font-weight: 800; line-height: 1.3; }
.pr-mini a:hover b { color: var(--bl-red); }
.pr-mini span { color: var(--bl-muted); font-size: 12.5px; font-weight: 600; }

/* ---------- просмотр фото ---------- */
.pr-lb { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: rgba(12, 12, 15, .96); color: #fff; opacity: 0; transition: opacity .2s; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.pr-lb.is-open { opacity: 1; }
.pr-lb__stage { position: relative; display: flex; flex: 1; align-items: center; justify-content: center; min-height: 0; padding: 56px 76px 8px; }
.pr-lb__img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); transition: opacity .2s; }
.pr-lb__img.is-loading { opacity: .35; }
.pr-lb__bar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 20px 18px; font-size: 14px; line-height: 1.4; text-align: center; }
.pr-lb__cap { color: rgba(255, 255, 255, .88); font-weight: 600; }
.pr-lb__count { color: rgba(255, 255, 255, .55); font-weight: 700; white-space: nowrap; }
.pr-lb button { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; transition: background-color .15s; }
.pr-lb button:hover { background: var(--bl-red, #c80000); }
.pr-lb button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pr-lb button svg { width: 22px; height: 22px; }
.pr-lb__close { top: 12px; right: 14px; }
.pr-lb__prev { left: 14px; top: 50%; margin-top: -24px; }
.pr-lb__next { right: 14px; top: 50%; margin-top: -24px; }

/* ---------- адаптив ---------- */
@media (max-width: 1199px) {
    .pr-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pr-vteaser .vd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .pr-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .pr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pr-it { flex-basis: calc(var(--r) * 190px); }
}
@media (max-width: 640px) {
    .pr-lb__stage { padding: 54px 0 4px; }
    .pr-lb__img { border-radius: 0; }
    .pr-lb__prev, .pr-lb__next { top: auto; bottom: 10px; margin-top: 0; width: 44px; height: 44px; }
    .pr-lb__bar { min-height: 64px; padding: 8px 64px 14px; }
}
@media (max-width: 575px) {
    .pr-cats { grid-template-columns: minmax(0, 1fr); }
    .pr-steps { grid-template-columns: minmax(0, 1fr); }
    .pr-gal { gap: 5px; }
    .pr-it { flex-basis: calc(var(--r) * 140px); border-radius: 6px; }
    .pr-it figcaption { display: none; }
    .pr-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .pr-vteaser .vd-grid { grid-template-columns: minmax(0, 1fr); }
    .pr-nav, .pr-filter { gap: 6px; }
    .pr-nav .bl-chip, .pr-filter .bl-chip { padding: 7px 12px; }
    .pr-filter { flex-wrap: nowrap; overflow-x: auto; margin: 0 -15px 10px; padding: 2px 15px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .pr-filter::-webkit-scrollbar { display: none; }
    .pr-filter .bl-chip { flex: none; }
    .pr-page--video [data-pr-list].vd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .pr-page--video [data-pr-list] .vd-b { padding: 8px 10px 10px; }
    .pr-page--video [data-pr-list] .vd-title { font-size: 13px; }
    .pr-page--video [data-pr-list] .vd-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .pr-cat > a, .pr-cat__img img, .pr-it img, .pr-it figcaption, .pr-lb, .pr-lb__img, .pr-mini img { transition: none; }
    .pr-cat > a:hover, .pr-cat > a:hover .pr-cat__img img, .pr-it > a:hover img { transform: none; }
}
