/* Раздел «Презентации» Главпос. Все стили внутри .gp-pres, чтобы не задевать шаблон сайта. */
.gp-pres { --gp-red: #B41818; --gp-ink: #1E1B1B; --gp-muted: #6F6763; --gp-line: #E6E0DA; --gp-warm: #F4F1ED;
  color: var(--gp-ink); font-size: 16px; line-height: 1.45; margin: 0 auto 48px; max-width: 1280px; }
.gp-pres *, .gp-pres *::before, .gp-pres *::after { box-sizing: border-box; }
body.gp-standalone { margin: 0; padding: 24px 16px; font-family: Inter, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: #fff; }
.gp-pres h1 { font-size: clamp(26px, 4vw, 40px); line-height: 1.1; margin: 0 0 8px; }
.gp-intro { color: var(--gp-muted); margin: 0 0 24px; max-width: 720px; }
.gp-empty { color: var(--gp-muted); padding: 40px 0; }

/* кнопки */
.gp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px;
  border-radius: 8px; border: 1px solid var(--gp-line); background: #fff; color: var(--gp-ink) !important; font: inherit;
  font-size: 15px; font-weight: 600; text-decoration: none !important; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.gp-btn:hover { border-color: var(--gp-ink); }
.gp-btn-red { background: var(--gp-red); border-color: var(--gp-red); color: #fff !important; }
.gp-btn-red:hover { background: #8E1212; border-color: #8E1212; }
.gp-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--gp-red) !important;
  text-decoration: none !important; cursor: pointer; }
.gp-link:hover { text-decoration: underline !important; }
.gp-muted { color: var(--gp-muted) !important; font-weight: 500; }

/* админ-панель */
.gp-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px; margin: 0 0 24px;
  border: 1px dashed #d8c9c4; border-radius: 12px; background: #FBF7F5; }
.gp-admin-note { color: var(--gp-muted); font-size: 13px; flex: 1 1 260px; }
.gp-progress { flex-basis: 100%; font-size: 14px; color: var(--gp-ink); }
.gp-progress:empty { display: none; }

/* сетка карточек */
.gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.gp-card { border: 1px solid var(--gp-line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s; }
.gp-card:hover { box-shadow: 0 10px 30px rgba(30, 27, 27, .10); transform: translateY(-2px); }
.gp-thumb { display: block; aspect-ratio: 16 / 9; background: var(--gp-warm); overflow: hidden; }
.gp-thumb img, .gp-thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gp-card-title { font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--gp-ink) !important; text-decoration: none !important; }
.gp-card-title:hover { color: var(--gp-red) !important; }
.gp-card-meta { font-size: 13px; color: var(--gp-muted); }
.gp-card-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 8px; }

/* просмотр */
.gp-view { max-width: 1240px; }
.gp-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 10px 0; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--gp-line); }
.gp-back { font-size: 14px; font-weight: 600; color: var(--gp-muted) !important; text-decoration: none !important; }
.gp-back:hover { color: var(--gp-red) !important; }
.gp-view-title { flex-basis: 100%; order: -1; font-size: clamp(22px, 3vw, 32px) !important; margin: 0 !important; }
.gp-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.gp-counter { font-size: 14px; color: var(--gp-muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
.gp-hint { font-size: 13px; color: var(--gp-muted); margin: 12px 0 16px; }
.gp-pages { display: flex; flex-direction: column; gap: 16px; }
.gp-page { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--gp-warm); border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 0 var(--gp-line), 0 6px 24px rgba(30, 27, 27, .06); }
.gp-page:not(.is-ready)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: gp-shimmer 1.4s infinite; }
@keyframes gp-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.gp-page canvas { display: block; width: 100%; height: 100%; }
.gp-links { position: absolute; inset: 0; }
.gp-links a { position: absolute; display: block; border-radius: 6px; transition: background .15s, box-shadow .15s; }
.gp-links a:hover { background: rgba(180, 24, 24, .06); box-shadow: inset 0 0 0 2px rgba(180, 24, 24, .55); }
.gp-loading { padding: 60px 0; text-align: center; color: var(--gp-muted); }

@media (max-width: 640px) {
  .gp-bar { gap: 8px; position: static; backdrop-filter: none; }
  .gp-bar-actions { margin-left: 0; width: 100%; }
  .gp-bar-actions .gp-btn { flex: 1 1 auto; height: 38px; padding: 0 10px; font-size: 14px; }
  .gp-counter { width: 100%; }
  .gp-pages { gap: 10px; }
  .gp-page { border-radius: 6px; }
}
span.gp-btn { cursor: pointer; user-select: none; }
