/* Группы изображений в тексте; слайдер использует штатный Swiper сайта. */
.gg-editor-gallery{margin:24px 0;border-radius:10px;overflow:hidden;background:var(--gg-soft,#eef1f6);position:relative;clear:both;max-width:100%}
.gg-editor-gallery figure{margin:0;min-width:0}
.gg-editor-gallery img{display:block;width:100%;height:auto;margin:0;border-radius:0}
.gg-editor-gallery a{display:block;height:100%}
.gg-editor-gallery figcaption{font:13px/1.4 Arial,sans-serif;padding:8px 12px;color:var(--gg-muted,#57677b);background:var(--gg-surface,#fff)}
.gg-editor-gallery[data-layout="collage"] .gg-editor-gallery-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.gg-editor-gallery[data-layout="collage"] .gg-editor-gallery-item{position:relative;height:200px;overflow:hidden;width:auto}
.gg-editor-gallery[data-layout="collage"] .gg-editor-gallery-item:first-child{grid-column:span 2;grid-row:span 2;height:406px}
.gg-editor-gallery[data-layout="collage"] img{height:100%;object-fit:cover}
.gg-editor-gallery[data-layout="collage"] figcaption{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.65);color:white}
.gg-editor-gallery[data-layout="collage"][data-count="2"] .gg-editor-gallery-track{grid-template-columns:repeat(2,minmax(0,1fr))}
.gg-editor-gallery[data-layout="collage"][data-count="2"] .gg-editor-gallery-item:first-child{grid-column:auto;grid-row:auto;height:200px}
.gg-editor-gallery[data-layout="slider"] .gg-editor-gallery-track{display:block}
.gg-editor-gallery[data-layout="slider"] .gg-editor-gallery-item{display:none}
.gg-editor-gallery[data-layout="slider"] .gg-editor-gallery-item:first-child{display:block}
.gg-editor-gallery[data-layout="slider"].swiper-container-initialized .gg-editor-gallery-track{display:flex;box-sizing:content-box;align-items:flex-start;transition-property:transform}
.gg-editor-gallery[data-layout="slider"].swiper-container-initialized .gg-editor-gallery-item{display:block;flex-shrink:0;width:100%;position:relative;transition-property:transform}
.gg-editor-gallery[data-layout="slider"]{touch-action:pan-y}
.gg-gallery-prev,.gg-gallery-next{position:absolute;top:50%;transform:translateY(-50%);z-index:5;width:44px;height:44px;border:1px solid rgba(255,255,255,.5);border-radius:50%;background:rgba(0,0,0,.6);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
.gg-gallery-prev{left:12px}.gg-gallery-next{right:12px}.gg-gallery-prev:disabled,.gg-gallery-next:disabled{opacity:.25;cursor:default}
.gg-gallery-prev svg,.gg-gallery-next svg{width:24px;height:24px}.gg-gallery-counter{position:absolute;right:12px;top:12px;z-index:5;color:#fff;background:rgba(0,0,0,.7);padding:5px 9px;border-radius:5px;font:12px/1.4 Arial,sans-serif}
.gg-editor-gallery .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}
@media(max-width:600px){.gg-editor-gallery[data-layout="collage"] .gg-editor-gallery-item{height:120px}.gg-editor-gallery[data-layout="collage"] .gg-editor-gallery-item:first-child{height:246px}.gg-editor-gallery[data-layout="collage"][data-count="2"] .gg-editor-gallery-item:first-child{height:120px}.gg-gallery-prev,.gg-gallery-next{width:36px;height:36px}.gg-gallery-prev{left:8px}.gg-gallery-next{right:8px}}
.gg-editor-gallery a[data-fancybox]{position:relative}
.gg-editor-gallery a[data-fancybox]::after{content:"";position:absolute;bottom:12px;left:12px;width:30px;height:30px;border-radius:4px;background:rgba(0,0,0,.65) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M14 3h7v7M21 3l-8 8M10 21H3v-7M3 21l8-8'/%3E%3C/svg%3E") center/19px no-repeat;pointer-events:none}
.gg-gallery-prev.swiper-button-disabled,.gg-gallery-next.swiper-button-disabled{opacity:.25;cursor:default}
/* Автоматическая галерея с основной картинкой и нижней лентой. */
.gg-editor-gallery[data-count="1"] .gg-editor-gallery-track{display:block;grid-template-columns:1fr}
.gg-editor-gallery[data-count="1"] .gg-editor-gallery-item:first-child{height:auto;grid-column:auto;grid-row:auto}
.gg-editor-gallery.gg-gallery-is-slider .gg-editor-gallery-track{display:block;gap:0}
.gg-editor-gallery.gg-gallery-is-slider .gg-editor-gallery-item,.gg-editor-gallery.gg-gallery-is-slider .gg-editor-gallery-item:first-child{display:none;height:auto;grid-row:auto;grid-column:auto;overflow:visible}
.gg-editor-gallery.gg-gallery-is-slider .gg-editor-gallery-item:first-child{display:block}
.gg-editor-gallery.gg-gallery-is-slider .gg-gallery-stage.swiper-container-initialized .gg-editor-gallery-track{display:flex;align-items:flex-start;box-sizing:content-box;transition-property:transform}
.gg-editor-gallery.gg-gallery-is-slider .gg-gallery-stage.swiper-container-initialized .gg-editor-gallery-item{display:block;flex-shrink:0;width:100%;position:relative;transition-property:transform}
.gg-editor-gallery.gg-gallery-is-slider img{height:auto;object-fit:contain}
.gg-editor-gallery.gg-gallery-is-slider figcaption{position:static;background:var(--gg-surface,#fff);color:var(--gg-muted,#57677b)}
.gg-gallery-stage{position:relative;overflow:hidden;touch-action:pan-y}
.gg-gallery-thumbs{overflow:hidden;padding:8px;background:var(--gg-surface,#fff)}
.gg-gallery-thumbs>.swiper-wrapper{display:flex;box-sizing:content-box;transition-property:transform}
.gg-gallery-thumbs .gg-gallery-thumb{display:block;width:140px;height:84px;flex-shrink:0;border:2px solid transparent;padding:0;margin:0;background:transparent;cursor:pointer;border-radius:5px;overflow:hidden;opacity:.55}
.gg-gallery-thumbs .gg-gallery-thumb img{height:100%;object-fit:cover}
.gg-gallery-thumbs .gg-gallery-thumb[aria-current="true"]{border-color:var(--gg-blue,#0064ed);opacity:1}
@media(max-width:600px){.gg-gallery-thumbs .gg-gallery-thumb{width:100px;height:64px}}
.gg-editor-gallery .gg-gallery-counter{left:auto;bottom:auto;width:auto;pointer-events:none}
