.gallery-page { background: #f5fbff; }
.gallery-page h1, .gallery-page h2, .gallery-page h3 { font-family: "Montserrat", sans-serif; }
.gallery-hero { position: relative; isolation: isolate; background: var(--gallery-hero-image, url("../../img/geral/hero/rio_mira.JPG")) center 45% / cover no-repeat; }
.gallery-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4,46,75,.88), rgba(4,46,75,.48) 58%, rgba(4,46,75,.12)); }
.gallery-hero-inner { position: relative; z-index: 2; display: flex; align-items: center; min-height: 270px; padding-top: 20px; padding-bottom: 70px; }
.gallery-hero h1 { margin: 0 0 8px; color: #fff; font-size: clamp(2.7rem, 4.5vw, 4.2rem); line-height: 1.1; font-weight: 800; }
.gallery-hero p { margin: 0; color: #fff; font-size: clamp(1.1rem, 1.6vw, 1.4rem); }
.gallery-waves { position: absolute; z-index: 3; inset: auto 0 -1px; height: clamp(60px, 7vw, 100px); pointer-events: none; }
.gallery-waves svg { display: block; width: 100%; height: 100%; }
.gallery-wave-blue { fill: rgba(58,171,221,.84); }
.gallery-wave-green { fill: rgba(35,151,73,.9); }
.gallery-wave-white { fill: #f5fbff; }
.gallery-content { padding: 18px 0 72px; background: radial-gradient(circle at 7% 32%, #e6f4ff, transparent 38%), #f5fbff; }
.gallery-container { max-width: 1480px; padding-inline: clamp(18px, 4vw, 62px); }
.gallery-toolbar { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; margin-bottom: 24px; }
.gallery-toolbar h2 { margin: 0 0 4px; color: #142d50; font-size: clamp(1.65rem, 2.4vw, 2.3rem); font-weight: 800; letter-spacing: -.035em; }
.gallery-toolbar p { margin: 0; color: #607490; font-size: clamp(.98rem, 1.25vw, 1.15rem); }
.gallery-filters { display: flex; gap: 9px; flex-wrap: wrap; }
.gallery-filter { min-height: 42px; padding: 8px 20px; border: 1px solid transparent; border-radius: 999px; background: #e0f0ff; color: #142d50; font: 700 .91rem "Montserrat", sans-serif; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.gallery-filter:hover { background: #cae7fa; }
.gallery-filter:focus-visible, .gallery-card:focus-visible, .gallery-dialog-close:focus-visible { outline: 3px solid #176da8; outline-offset: 3px; }
.gallery-filter[aria-pressed="true"] { background: #114983; color: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(210px, 18vw, 265px); gap: 15px; }
.gallery-card { position: relative; grid-column: span 3; display: block; overflow: hidden; padding: 0; border: 0; border-radius: 7px; background: #d6e8f2; cursor: zoom-in; text-align: left; box-shadow: 0 5px 16px rgba(8,47,74,.09); }
.gallery-card--featured { grid-column: span 6; }
.gallery-card[hidden] { display: none !important; }
.gallery-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-card:hover img, .gallery-card:focus-visible img { transform: scale(1.04); }
.gallery-card[data-video-src]::after { content: "▶"; position: absolute; top: 50%; left: 50%; z-index: 1; display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid #fff; border-radius: 50%; background: rgba(6,39,67,.78); color: #fff; font-size: 1.45rem; transform: translate(-50%,-50%); }
.gallery-card[data-video-src][data-duration]::before { content: "VÍDEO · " attr(data-duration); position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: 5px 9px; border-radius: 5px; background: rgba(5,32,54,.82); color: #fff; font-size: .73rem; font-weight: 700; }
.gallery-card-caption { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; gap: 2px; padding: 30px 16px 14px; background: linear-gradient(transparent, rgba(5,32,54,.85)); color: #fff; opacity: 0; transition: opacity .25s; }
.gallery-card:hover .gallery-card-caption, .gallery-card:focus-visible .gallery-card-caption { opacity: 1; }
.gallery-card-caption span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.gallery-card-caption strong { font: 700 clamp(.94rem, 1.2vw, 1.12rem) "Montserrat", sans-serif; }
.gallery-grid.is-filtered { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); grid-auto-rows: clamp(230px, 24vw, 325px); }
.gallery-grid.is-filtered .gallery-card { grid-column: auto; }
.gallery-empty { margin: 26px 0 0; color: #607490; font-weight: 600; text-align: center; }
.gallery-card-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; background: linear-gradient(135deg,#0e4b78,#176da8); font-size: 3rem; }
.gallery-dialog { width: min(1180px, calc(100% - 28px)); max-width: none; max-height: calc(100% - 28px); padding: 0; overflow: visible; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 20px 65px rgba(0,0,0,.3); }
.gallery-dialog::backdrop { background: rgba(4,25,46,.88); }
.gallery-dialog-content { position: relative; overflow: hidden; border-radius: 12px; background: #fff; }
.gallery-dialog-stage { display: grid; place-items: center; min-height: min(68vh, 680px); background: #061d31; touch-action: pan-y; }
.gallery-dialog img, .gallery-dialog video { display: block; max-width: 100%; max-height: min(76vh, 760px); width: auto; margin: auto; object-fit: contain; }
.gallery-dialog [hidden] { display: none !important; }
.gallery-dialog-close,
.gallery-dialog-nav { position: absolute; z-index: 3; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(5,35,57,.88); color: #fff; cursor: pointer; }
.gallery-dialog-close { top: 12px; right: 12px; width: 42px; height: 42px; font-size: 1.8rem; line-height: 1; }
.gallery-dialog-nav { top: 50%; width: 48px; height: 48px; font-size: 2.35rem; line-height: 1; transform: translateY(-50%); }
.gallery-dialog-nav--prev { left: 14px; }
.gallery-dialog-nav--next { right: 14px; }
.gallery-dialog-close:focus-visible,
.gallery-dialog-nav:focus-visible { outline: 3px solid #7dc9f2; outline-offset: 3px; }
.gallery-dialog-info { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 15px 20px 17px; text-align: left; }
.gallery-dialog-info h2 { margin: 0; color: #142d50; font-size: clamp(1.05rem, 2vw, 1.45rem); font-weight: 800; }
.gallery-dialog-caption { margin: 6px 0 0; padding: 0; color: #607490; font-weight: 400; line-height: 1.5; }
.gallery-dialog-date { margin: 0 0 4px; padding: 0; color: #176da8; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.gallery-dialog-counter { flex: 0 0 auto; color: #607490; font-size: .8rem; font-weight: 800; }
@media (hover: none) { .gallery-card-caption { opacity: 1; } }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 225px; } .gallery-card { grid-column: span 1; } .gallery-card--featured { grid-column: span 2; } .gallery-toolbar { align-items: start; } .gallery-dialog-stage { min-height: 56vh; } }
@media (max-width: 550px) { .gallery-hero-inner { min-height: 265px; padding-bottom: 68px; } .gallery-filters { gap: 6px; } .gallery-filter { min-height: 38px; padding: 7px 13px; font-size: .78rem; } .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 235px; gap: 9px; } .gallery-card, .gallery-card--featured { grid-column: span 1; } .gallery-grid.is-filtered { grid-template-columns: 1fr; grid-auto-rows: 235px; } .gallery-card-caption { padding: 18px 10px 9px; } .gallery-card-caption strong { font-size: .84rem; } .gallery-card-caption span { font-size: .64rem; } .gallery-dialog { width: calc(100% - 16px); max-height: calc(100% - 16px); } .gallery-dialog-stage { min-height: 54vh; } .gallery-dialog-nav { width: 42px; height: 42px; } .gallery-dialog-nav--prev { left: 8px; } .gallery-dialog-nav--next { right: 8px; } .gallery-dialog-info { align-items: start; padding: 12px 14px 14px; } }
