/* Galería: cómo se ven las fotos (config planazo.gallery_styles, editor «Cómo se ven las fotos»).
   «Fotos enteras» (gallery-style-rows) es la galería de antes: sigue con invitation-custom.css y las filas de invitation.js.
   En el resto las fotos quedan parejas (se recortan un poco, con la cara hacia arriba) y tocándolas se ven enteras. */
.invitation-gallery-grid:not(.gallery-style-rows){--g:14px;--cols:var(--gallery-cols,3)}
.invitation-gallery-grid:not(.gallery-style-rows):after{display:none}
.invitation-gallery-grid:not(.gallery-style-rows) .gallery-photo{max-height:none;min-height:0}
.invitation-gallery-grid:not(.gallery-style-rows) .gallery-photo img{object-position:50% 30%}
.invitation-gallery-grid:not(.gallery-style-rows) .gallery-photo-caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.gallery-style-grid .gallery-photo img,.gallery-style-feature .gallery-photo img,.gallery-style-carousel .gallery-photo img{position:absolute;inset:0;width:100%;height:100%}

/* Ordenadas: todas iguales (4:5), 3 por fila en la compu y 2 en el celular; si sobra una, queda centrada. */
.gallery-style-grid,.gallery-style-polaroid{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--g);max-width:calc(var(--cols)*300px + (var(--cols) - 1)*var(--g));margin-inline:auto}
.gallery-style-grid .gallery-photo{flex:0 0 calc((100% - (var(--cols) - 1)*var(--g))/var(--cols));aspect-ratio:4/5;border-radius:14px}

/* Destacadas: de a tres, una grande y dos chicas; en la compu la grande va una vez a cada lado. */
.gallery-style-feature{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-flow:row dense;gap:var(--g);max-width:960px;margin-inline:auto}
.gallery-style-feature .gallery-photo{grid-column:span 2;aspect-ratio:1;border-radius:14px}
.gallery-style-feature .tile-big{grid-column:span 4;grid-row:span 2;aspect-ratio:auto}
.gallery-style-feature .tile-big.tile-flip{grid-column:3/span 4}
.gallery-style-feature .tile-half{grid-column:span 3;aspect-ratio:4/3}
.gallery-style-feature .tile-solo{grid-column:2/span 4;aspect-ratio:4/3}

/* Carrusel: una por vez y entera, sobre un fondo hecho con la misma foto. Se pasa con el dedo, con las flechas o sola. */
.gallery-carousel{container-type:inline-size;margin-top:45px}
.gallery-style-carousel{--slide:min(78cqw,420px);position:relative;display:flex;flex-wrap:nowrap;gap:var(--g);margin:0;padding:8px calc(50cqw - var(--slide)/2);overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none}
.gallery-style-carousel::-webkit-scrollbar{display:none}
.gallery-style-carousel .gallery-photo{flex:0 0 var(--slide);aspect-ratio:4/5;scroll-snap-align:center;scroll-snap-stop:always;transition:opacity .45s,transform .45s cubic-bezier(.2,.7,.3,1)}
.gallery-style-carousel.is-ready .gallery-photo:not(.is-current){opacity:.45;transform:scale(.92);cursor:pointer}
.gallery-style-carousel .gallery-photo img:not(.gallery-photo-fill){z-index:1;object-fit:contain;object-position:50% 50%}
.gallery-style-carousel .gallery-photo .gallery-photo-fill,.gallery-style-carousel .gallery-photo:hover .gallery-photo-fill{object-fit:cover;filter:blur(18px) saturate(1.15);transform:scale(1.25);opacity:.9}
.gallery-style-carousel .gallery-photo:hover img:not(.gallery-photo-fill){transform:none}
.gallery-style-carousel .gallery-photo-caption{z-index:2;text-align:center}
.gallery-carousel-nav{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:20px}
.gallery-carousel-nav button{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;border:1px solid color-mix(in srgb,var(--ink) 25%,transparent);border-radius:50%;background:color-mix(in srgb,var(--paper) 80%,transparent);color:var(--ink);font-size:20px;line-height:1;cursor:pointer}
.gallery-carousel-dots{display:flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:7px;max-width:190px}
.gallery-carousel-dots i{width:7px;height:7px;border-radius:50%;background:var(--ink);opacity:.22;transition:opacity .3s,transform .3s}
.gallery-carousel-dots i.is-on{opacity:.85;transform:scale(1.3)}
.gallery-carousel-count{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Polaroid: marco blanco, la frase escrita abajo y cada foto apenas torcida. */
.gallery-style-polaroid{--g:24px;row-gap:30px;padding:8px 4px 12px}
.gallery-style-polaroid .gallery-photo{flex:0 0 calc((100% - (var(--cols) - 1)*var(--g))/var(--cols));aspect-ratio:auto;overflow:visible;isolation:auto;padding:10px 10px 0;border-radius:3px;background:#fffdf9;box-shadow:0 14px 30px #00000029,0 1px 3px #00000024;transform:rotate(var(--tilt,-1.6deg));transition:transform .45s cubic-bezier(.2,.7,.3,1)}
.gallery-style-polaroid .gallery-photo:nth-child(4n+2){--tilt:1.4deg}
.gallery-style-polaroid .gallery-photo:nth-child(4n+3){--tilt:-.7deg}
.gallery-style-polaroid .gallery-photo:nth-child(4n){--tilt:2deg}
.gallery-style-polaroid .gallery-photo:hover{transform:rotate(0) scale(1.03);z-index:1}
.gallery-style-polaroid .gallery-photo img{display:block;width:100%;height:auto;aspect-ratio:4/5;border-radius:1px;background:#ece8e1}
.gallery-style-polaroid .gallery-photo:hover img{transform:none}
.gallery-style-polaroid .gallery-photo-caption{position:static;min-height:46px;padding:9px 4px 11px;background:none;color:#3b3631;text-align:center;font:19px/1.2 Parisienne,'Great Vibes',cursive;letter-spacing:0}
.gallery-style-polaroid .gallery-photo-caption.is-empty{display:block;min-height:42px;padding:0}

@media(max-width:700px){
.invitation-gallery-grid:not(.gallery-style-rows){--g:10px;--cols:var(--gallery-phone-cols,2)}
.gallery-style-grid,.gallery-style-polaroid{max-width:none}
.gallery-style-grid .gallery-photo,.gallery-style-feature .gallery-photo{border-radius:11px}
.gallery-style-grid .gallery-photo-caption,.gallery-style-feature .tile-small .gallery-photo-caption,.gallery-style-feature .tile-half .gallery-photo-caption{padding:24px 9px 9px;font-size:10.5px;line-height:1.45;-webkit-line-clamp:2}
.gallery-style-feature{grid-template-columns:repeat(2,minmax(0,1fr))}
.gallery-style-feature .gallery-photo,.gallery-style-feature .tile-half{grid-column:span 1;aspect-ratio:1}
.gallery-style-feature .tile-big,.gallery-style-feature .tile-big.tile-flip,.gallery-style-feature .tile-solo{grid-column:1/-1;grid-row:auto;aspect-ratio:4/3}
.gallery-style-feature .tile-big.is-portrait,.gallery-style-feature .tile-solo.is-portrait{aspect-ratio:4/5}
.gallery-carousel{margin-top:28px}
.gallery-style-carousel{--slide:min(80cqw,420px)}
.gallery-carousel-nav{gap:12px;margin-top:16px}
.gallery-carousel-dots{gap:6px;max-width:150px}
.gallery-carousel-dots i{width:6px;height:6px}
.gallery-style-polaroid{--g:14px;row-gap:20px;padding-inline:2px}
.gallery-style-polaroid .gallery-photo{padding:6px 6px 0}
.gallery-style-polaroid .gallery-photo-caption{min-height:34px;padding:6px 2px 8px;font-size:15px;-webkit-line-clamp:2}
.gallery-style-polaroid .gallery-photo-caption.is-empty{min-height:28px}
}
@media(prefers-reduced-motion:reduce){.gallery-style-carousel .gallery-photo,.gallery-style-polaroid .gallery-photo{transition:none}.gallery-style-polaroid .gallery-photo:hover{transform:rotate(var(--tilt,-1.6deg))}}
