/* A single manual media carousel; the About hero keeps its own styles. */
.company-gallery {
  --company-ink: #12384f;
  --company-muted: #456175;
  --company-blue: #07629b;
  box-sizing: border-box;
  grid-column: 1 / -1;
  width: calc(100% - 11.6%);
  max-width: 1280px;
  min-width: 0;
  justify-self: center;
  margin: clamp(36px, 5vw, 76px) auto 76px;
  padding: clamp(18px, 3vw, 40px);
  border: 1px solid #ffffffdf;
  border-radius: 34px;
  background: linear-gradient(125deg, #f4faffed, #edf6fce8);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: inset 0 1px 0 #fff, 0 25px 75px #153a541c;
  color: var(--company-ink);
}
.company-gallery *, .company-lightbox * { box-sizing: border-box; }
.company-gallery [hidden], .company-lightbox [hidden] { display: none !important; }
.company-gallery button, .company-gallery a, .company-lightbox button { -webkit-tap-highlight-color: transparent; }
.company-gallery button, .company-lightbox button { font: inherit; cursor: pointer; }
.company-gallery button:focus-visible, .company-gallery a:focus-visible, .company-lightbox button:focus-visible { outline: 3px solid #1385c7; outline-offset: 4px; }
.company-gallery__context { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.65fr); align-items: center; gap: clamp(24px, 3.5vw, 48px); padding-bottom: clamp(26px, 3vw, 40px); border-bottom: 1px solid #587a931f; }
.company-gallery .company-gallery__context h2 { margin: 0; font-size: clamp(25px, 2.5vw, 36px); font-weight: 650; letter-spacing: -.04em; line-height: 1.15; color: var(--company-ink); }
.company-gallery__context h2 span { color: var(--company-blue); }
.company-gallery .company-gallery__context p { margin: 0; max-width: 74ch; color: var(--company-muted); font-size: 17px; line-height: 1.85; }
.company-gallery__intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 3vw, 36px) 0; }
.company-gallery__intro > div { min-width: 0; }
.company-gallery .company-gallery__intro h2 { margin: 0; color: var(--company-ink); font-size: clamp(28px, 2.8vw, 42px); font-weight: 650; letter-spacing: -.048em; line-height: 1.1; }
.company-gallery .company-gallery__description { margin: 12px 0 0; color: var(--company-muted); font-size: 16px; line-height: 1.75; }
.company-gallery__catalog { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 28px; min-height: 46px; max-width: 100%; padding: 11px 19px; border: 1px solid #bacfdd; border-radius: 99px; background: #fffc; color: var(--company-ink); font-size: 16px; font-weight: 650; text-decoration: none; }
.company-gallery__catalog:hover { background: #fff; border-color: #87acc4; }
.company-gallery__catalog span { font-size: 19px; font-weight: 400; }
.company-gallery__carousel { min-width: 0; }
.company-gallery__track { position: relative; display: flex; gap: 16px; width: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: 24px; -webkit-overflow-scrolling: touch; }
.company-gallery__track::-webkit-scrollbar { display: none; }
.company-gallery__photo { display: block; flex: 0 0 100%; width: 100%; min-width: 0; height: clamp(300px, 48vw, 580px); margin: 0; padding: 8px; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; border: 1px solid #fff; border-radius: 24px; background: #ffffffb8; color: var(--company-ink); }
.company-gallery__photo:focus-visible { outline-offset: -4px; }
.company-gallery__image { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow: hidden; border-radius: 17px; background: linear-gradient(135deg, #eef3f6, #f8fbfd); }
.company-gallery__image img { display: block; width: 100%; height: 100%; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.company-gallery__play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 64px; height: 64px; padding-left: 4px; border: 1px solid #ffffffed; border-radius: 50%; background: #f6fbffda; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 5px 26px #12384f30; color: var(--company-ink); font-size: 25px; line-height: 1; }
.company-gallery__controls { display: flex; align-items: center; justify-content: center; gap: 24px; padding-top: 18px; }
.company-gallery .company-gallery__status { min-width: 72px; margin: 0; color: var(--company-muted); font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; text-align: center; }
.company-gallery__nav, .company-lightbox__close, .company-lightbox__nav { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; padding: 0; border: 1px solid #bdceda; border-radius: 50%; background: #ffffffc9; color: #163e57; font-size: 24px !important; line-height: 1; }
.company-gallery__nav:hover, .company-lightbox__close:hover, .company-lightbox__nav:hover { background: #fff; border-color: #87acc4; }
.company-gallery__nav:disabled, .company-lightbox__nav:disabled { opacity: .4; cursor: default; }
.company-lightbox { width: min(1280px, calc(100% - 40px)); max-width: calc(100% - 40px); height: min(960px, calc(100dvh - 40px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow: hidden; border: 1px solid #ffffffe6; border-radius: 26px; background: #f3f7fa; color: #163e57; box-shadow: 0 30px 100px #0b233655; }
.company-lightbox::backdrop { background: #102d48a6; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.company-lightbox__shell { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.company-lightbox__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; min-height: 70px; padding: 10px 18px 10px 24px; }
.company-lightbox__count { margin: 0; color: #456175; font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.company-lightbox__stage { flex: 1; min-height: 0; min-width: 0; display: flex; align-items: center; justify-content: center; margin: 0 18px; overflow: hidden; border-radius: 14px; background: #e9eef2; }
.company-lightbox__stage img, .company-lightbox__stage video { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.company-lightbox__stage video:focus-visible { outline: 3px solid #1385c7; outline-offset: -3px; }
.company-lightbox__footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 28px; min-height: 80px; padding: 16px 24px; }
.company-lightbox__description { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 850px) {
  .company-gallery__context { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 650px) {
  .company-gallery { width: calc(100% - 24px); padding: 16px; border-radius: 26px; margin-top: 36px; }
  .company-gallery__context { padding-bottom: 24px; }
  .company-gallery .company-gallery__context p { font-size: 16px; line-height: 1.8; }
  .company-gallery__intro { flex-wrap: wrap; align-items: flex-start; gap: 18px; padding-block: 24px; }
  .company-gallery .company-gallery__description { font-size: 16px; }
  .company-gallery__track { border-radius: 18px; gap: 12px; }
  .company-gallery__photo { height: clamp(280px, 82vw, 480px); padding: 5px; border-radius: 18px; }
  .company-gallery__image { border-radius: 13px; }
  .company-gallery__play { width: 56px; height: 56px; font-size: 22px; }
  .company-gallery__controls { gap: 20px; padding-top: 16px; }
  .company-lightbox { width: calc(100% - 16px); max-width: calc(100% - 16px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); border-radius: 20px; }
  .company-lightbox__header { padding: 10px 12px 10px 16px; gap: 8px; }
  .company-lightbox__stage { margin-inline: 10px; }
  .company-lightbox__footer { padding: 14px 12px; gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .company-gallery *, .company-lightbox * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .company-gallery { background: #f0f7fc; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .company-gallery__play { background: #f6fbff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .company-lightbox::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; background: #102d48db; }
}

/* Display-only correction; absent tone keeps the original presentation. */
.company-gallery__image img[data-company-tone="natural"],
.company-lightbox__stage img[data-company-tone="natural"] { filter: brightness(1.025) contrast(1.015) saturate(1.03); }
.company-gallery__image img[data-company-tone="portrait"],
.company-lightbox__stage img[data-company-tone="portrait"] { filter: brightness(1.04) contrast(1.015) saturate(1.015); }
.company-gallery__image img[data-company-tone="indoor"],
.company-lightbox__stage img[data-company-tone="indoor"] { filter: brightness(1.025) contrast(1.015) saturate(1.02); }

/* Morph enhancement keeps the original manual carousel as its no-JS fallback. */
body[data-theme="graphite"] .company-gallery{--company-ink:var(--ink);--company-muted:var(--muted);--company-blue:var(--accent);background:var(--gn-glass);border-color:var(--gn-edge);box-shadow:inset 0 1px #eaffff18,0 18px 50px #10212d22}
body[data-theme="graphite"] .company-gallery :is(.company-gallery__catalog,.company-gallery__nav){background:var(--gn-soft);border-color:var(--gn-edge);color:var(--ink)}
.company-gallery__morph{height:auto;aspect-ratio:4/3;position:relative;overflow:hidden;border:1px solid rgba(185,238,230,.28);border-radius:24px;touch-action:pan-y}
.company-gallery__morph[data-video="true"]::after{content:'▶ Смотреть видео';position:absolute;left:50%;bottom:24px;transform:translateX(-50%);pointer-events:none;padding:10px 18px;white-space:nowrap;border:1px solid #bdfff16b;border-radius:99px;background:#203e4ddd;color:#edfffa;font-size:15px;backdrop-filter:blur(16px)}
.company-gallery[data-morph="true"] .company-gallery__track{gap:10px;scroll-snap-type:none;border-radius:12px;padding:12px 2px 8px}
.company-gallery[data-morph="true"] .company-gallery__photo{flex:0 0 92px;width:92px;height:68px;padding:3px;border-radius:10px;background:rgba(42,65,80,.5);border:1px solid rgba(180,230,230,.22);opacity:.62}
.company-gallery[data-morph="true"] .company-gallery__photo[aria-current="true"]{opacity:1;border-color:var(--accent,#80ecd9);box-shadow:0 0 0 1px var(--accent,#80ecd9)}
.company-gallery[data-morph="true"] .company-gallery__photo:hover{opacity:1}
.company-gallery[data-morph="true"] .company-gallery__image{border-radius:6px;background:#293e4b}
.company-gallery[data-morph="true"] .company-gallery__image img{object-fit:contain}
.company-gallery[data-morph="true"] .company-gallery__play{width:24px;height:24px;font-size:10px}
@media(max-width:600px){.company-gallery__morph{border-radius:16px}.company-gallery[data-morph="true"] .company-gallery__photo{flex-basis:76px;width:76px;height:58px}}

body[data-theme="graphite"] .company-partners{--partners-ink:var(--ink);--partners-muted:var(--muted);background:var(--gn-glass);border-color:var(--gn-edge);box-shadow:inset 0 1px #eaffff18,0 18px 50px #10212d22}
body[data-theme="graphite"] .company-partners__initials{background:var(--gn-soft);border-color:var(--gn-edge);color:var(--accent)}
