/* MALTAWOW V7.0 | Original photos without forced cropping; unified accessible viewer */
/* Let photo dimensions, not card dimensions, determine height. */
.comino-gallery .comino-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:row;gap:18px;align-items:start}
.comino-gallery .comino-photos .comino-photo,
.comino-gallery .comino-photos .comino-photo.photo-1,
.comino-gallery .comino-photos .comino-photo.photo-2{grid-column:auto;min-height:0!important;height:auto;display:flex;flex-direction:column;position:relative;border:1px solid #ffffff25;box-shadow:0 8px 22px #001d291a;background:#104b61}
.comino-gallery .comino-photos .comino-photo img{position:static!important;display:block;width:100%;height:auto!important;max-width:100%;object-fit:contain!important;transform:none!important;transition:none!important}
.comino-gallery .comino-photos .comino-photo::after{display:none!important}
.comino-gallery .comino-photos .comino-photo figcaption{position:static!important;display:block;bottom:auto;left:auto;right:auto;padding:15px 17px;color:white;background:#104b61;line-height:1.45;min-height:0;z-index:auto}
.comino-gallery .comino-photos .comino-photo figcaption small{display:block;margin-top:4px;color:#c9e2e6;opacity:1}
.comino-gallery .comino-photos .comino-photo .mw-photo-open{display:block;position:relative;width:100%;height:auto;cursor:zoom-in;overflow:hidden;background:#072e40}
.comino-gallery .comino-photos .comino-photo .mw-photo-open img{display:block}
/* Home: thumbnails must retain the entire photograph, too. */
.places-grid .place-card figure{aspect-ratio:auto;min-height:0;height:auto}
.places-grid .place-card figure img{height:auto!important;width:100%;object-fit:contain!important;transform:none!important}
.gallery-mosaic{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;align-items:start}
.gallery-mosaic .gallery-item,.gallery-mosaic .gallery-item:nth-child(1),.gallery-mosaic .gallery-item:nth-child(4){grid-column:auto;grid-row:auto;display:flex;flex-direction:column;height:auto;min-height:0}
.gallery-mosaic .gallery-item img{height:auto!important;width:100%;object-fit:contain!important;transform:none!important;transition:none}
.gallery-mosaic .gallery-item::after{display:none}
.gallery-mosaic .gallery-item figcaption{position:static;background:#104b61;padding:13px 17px;color:white;font-size:13px}
.gallery-mosaic .gallery-item .mw-photo-open{display:block;position:relative}
.archive-grid{align-items:start}
.archive-grid .archive-card figure{aspect-ratio:auto;display:flex;flex-direction:column}
.archive-grid .archive-card img{width:100%;height:auto!important;object-fit:contain!important;transform:none!important;transition:none}
.archive-grid .archive-card figure::after{display:none}
.archive-grid .archive-card figcaption{position:static;background:#104b61;padding:14px 17px;min-height:70px}
.archive-grid .archive-card{cursor:zoom-in}
.guide-collection-grid>.mw-card-frame{min-width:0;position:relative}
.guide-collection-grid .mw-card-frame>.guide-collection-card{height:100%}
.guide-collection-card img{display:block;width:100%;height:180px;object-fit:contain;background:#e6f0ee;transform:none!important}
.mw-guide-zoom{position:absolute;z-index:4;top:12px;right:12px;width:37px;height:37px;display:grid;place-items:center;background:#063b4bdf;border:1px solid #ffffff70;border-radius:50%;color:white;font-size:19px;cursor:zoom-in;box-shadow:0 3px 14px #001d2940}
.mw-guide-zoom:hover,.mw-guide-zoom:focus-visible{background:#007c88}
/* Single photographs: remove cropping from the supporting illustration as well. */
.wild-layout figure img{height:auto!important;max-height:none;object-fit:contain!important;object-position:center!important}
.mw-photo-open{display:block;position:relative;cursor:zoom-in;outline-offset:3px}
.mw-photo-open:focus-visible{outline:3px solid #ffce43;outline-offset:3px}
.mw-photo-open .mw-photo-hint{position:absolute;z-index:5;right:12px;bottom:12px;width:33px;height:33px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#073c52e8;border:1px solid #ffffff75;font-size:18px;pointer-events:none}
/* Main image remains a cinematic background with readable headings; one tap reveals its complete version. */
.mw-hero-fullphoto{position:absolute;z-index:9;left:max(22px,calc((100vw - 1240px)/2));bottom:23px;display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:30px;color:#fff;background:#073c52df;border:1px solid #ffffff85;font-size:12px;font-weight:750;cursor:zoom-in}
.mw-hero-fullphoto:hover,.mw-hero-fullphoto:focus-visible{background:#007e8a}
.hero .mw-hero-fullphoto{bottom:70px}
/* Native Popeye / Valletta collections: preserve original aspect and avoid hover scaling. */
.destination-valletta .valletta-photocard>a img,
.destination-popeye-village .popeye-gallery-card>a img{width:100%!important;height:auto!important;object-fit:contain!important;transform:none!important;transition:none!important;object-position:center!important}
.destination-valletta .valletta-photocard>a:hover img,
.destination-popeye-village .popeye-gallery-card>a:hover img{transform:none!important}
/* Generic keyboard/touch-friendly photo viewer. */
.mw-gallery-dialog{box-sizing:border-box;border:0;position:fixed;inset:0;margin:auto;width:min(1260px,96vw);max-width:96vw;height:min(850px,96dvh);max-height:96dvh;background:#061f2a;color:#fff;padding:54px 16px 15px;border-radius:17px;box-shadow:0 28px 110px #000b;overflow:hidden}
.mw-gallery-dialog:not([open]){display:none}
.mw-gallery-dialog::backdrop{background:rgba(0,15,25,.92);backdrop-filter:blur(5px)}
.mw-gallery-dialog button{color:white;border:1px solid #ffffff65;background:#ffffff20;cursor:pointer}
.mw-gallery-close{position:absolute;top:12px;right:16px;z-index:5;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;font-size:29px;line-height:1}
.mw-gallery-stage{height:calc(100% - 76px);display:flex;align-items:center;justify-content:space-between;gap:7px;min-height:0}
.mw-gallery-stage img{display:block;min-width:0;min-height:0;max-width:calc(100% - 100px);max-height:100%;width:auto;height:auto;object-fit:contain;flex:0 1 auto}
.mw-gallery-arrow{display:grid;place-items:center;width:42px;height:46px;border-radius:13px;flex:0 0 auto;font-size:31px;line-height:1}
.mw-gallery-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 18px;padding:12px 12px 0;font-size:13px;line-height:1.5}
.mw-gallery-footer small{font-size:11px;color:#c8dfe2}
.mw-gallery-dialog button:hover{background:#ffffff4a}
.mw-gallery-dialog button:focus-visible{outline:3px solid #ffce43;outline-offset:3px}
@media(max-width:760px){
 .comino-gallery .comino-photos{grid-template-columns:1fr;gap:13px}
 .comino-gallery .comino-photos .comino-photo,.comino-gallery .comino-photos .comino-photo.photo-1,.comino-gallery .comino-photos .comino-photo.photo-2{grid-column:auto;min-height:0!important}
 .gallery-mosaic{grid-template-columns:1fr;grid-template-rows:auto;gap:12px}
 .gallery-mosaic .gallery-item:nth-child(1),.gallery-mosaic .gallery-item:nth-child(4){grid-column:auto;grid-row:auto}
 .guide-collection-card img{height:140px}
 .mw-hero-fullphoto{left:20px;bottom:52px;padding:9px 12px;font-size:11px}
 .hero .mw-hero-fullphoto{bottom:82px}
 .mw-gallery-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:53px 7px 13px}
 .mw-gallery-stage{height:calc(100% - 88px);gap:3px}
 .mw-gallery-stage img{max-width:calc(100% - 72px)}
 .mw-gallery-arrow{width:30px;height:44px;border:0!important;background:transparent!important;font-size:30px}
 .mw-gallery-footer{padding:10px 8px 0;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.mw-photo-open img{transition:none!important}}

/* MALTAWOW V7.2 — Mdina gallery: location-specific chapters and original image aspect ratios */
.destination-mdina .mdina-gallery-group{margin-top:38px}
.destination-mdina .mdina-gallery-group+.mdina-gallery-group{margin-top:62px;padding-top:39px;border-top:1px solid rgba(255,255,255,.18)}
.destination-mdina .mdina-gallery-group-heading{margin:0 0 22px}
.destination-mdina .mdina-gallery-group-heading h3{font-size:clamp(25px,3.5vw,34px);margin:0 0 8px;line-height:1.2;color:#fff}
.destination-mdina .mdina-gallery-group-heading p{font-size:15px;max-width:730px;line-height:1.6;margin:0;color:#d1e4e6}
.destination-mdina .mdina-gallery-group .comino-photos .comino-photo{min-width:0}
@media(max-width:760px){.destination-mdina .mdina-gallery-group{margin-top:30px}.destination-mdina .mdina-gallery-group+.mdina-gallery-group{margin-top:45px;padding-top:30px}.destination-mdina .mdina-gallery-group-heading{margin-bottom:16px}.destination-mdina .mdina-gallery-group-heading p{font-size:14px}}
