/* Public gallery pages follow the site's blue palette and heading scale. */
.gallery-folders-page, .gallery-photos-page { background: #f6f8fb; }
.gallery-container { padding-top: clamp(28px, 5vw, 56px) !important; padding-bottom: clamp(42px, 6vw, 72px) !important; }
.gallery-folders-page .page-header h1, .gallery-photos-page .page-header h1 { color: #173c63 !important; font-size: 2.75em; line-height: 1.15; }
.gallery-folders-page .page-header-caminho h1, .gallery-photos-page .page-header-caminho h1 { color: #fff !important; }
.gallery-folders-page .page-header-caminho .sub-title, .gallery-photos-page .page-header-caminho .sub-title { color: #d7e4f1 !important; }
.gallery-folders-page .page-header .sub-title, .gallery-photos-page .page-header .sub-title { color: #63788e !important; font-size: 1rem; }
.gallery-folders-page .page-header-caminho .sub-title, .gallery-photos-page .page-header-caminho .sub-title { color: #d7e4f1 !important; }
.gallery-section-title { margin: 0 0 24px; color: #173c63; font-size: 2em; line-height: 1.2; }
.gallery-grid { width: 100%; border-spacing: 14px !important; border-collapse: separate !important; }
.gallery-grid td { width: 33.333%; padding: 0; vertical-align: top; }
.gallery-folder-card { display: block; overflow: hidden; border: 1px solid #e4ebf3; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(20, 50, 82, .08); }
.gallery-folder-card .thumb-info-wrapper { display: block; overflow: hidden; border-radius: 17px; }
.gallery-folder-card .thumb-info-wrapper img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s ease; }
.gallery-folder-card:hover .thumb-info-wrapper img { transform: scale(1.035); }
.gallery-folder-card { color: inherit; text-decoration: none !important; transition: transform .2s ease, box-shadow .2s ease; }
.gallery-folder-card .thumb-info-wrapper { aspect-ratio: 4 / 3; background: #eef2f7; }
.gallery-folder-card .thumb-info-wrapper { margin: 10px 10px 0; border-radius: 12px 12px 0 0; }
.gallery-folder-card .thumb-info-wrapper { position: relative; z-index: 1; box-shadow: 0 8px 16px rgba(23, 60, 99, .22); }
.gallery-folder-card .thumb-info-wrapper img { height: 100%; object-fit: cover; }
.gallery-folder-card .thumb-info-wrapper img { border-radius: 12px 12px 0 0 !important; }
.gallery-folder-caption { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #fff; }
.gallery-folder-name { min-width: 0; color: #173c63; font-size: 1rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; text-align: left; }
.gallery-folder-name i { margin-right: 8px; color: #2c3d63; }
.gallery-folder-action { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; color: #2c3d63; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.gallery-folder-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(20, 50, 82, .15); }
.gallery-folder-card:hover .gallery-folder-action { color: #2c3d63; }
.gallery-folder-card:focus-visible { outline: 3px solid rgba(23, 105, 165, .4); outline-offset: 3px; }
.gallery-folder-card .thumb-info-title { padding: 18px !important; }
.gallery-folder-card .thumb-info-inner { font-size: 1.15rem; line-height: 1.3; }
.gallery-folder-card .thumb-info-type { margin-top: 5px; color: #dbe8f5; font-size: .8rem; }
.gallery-photo-cell { padding: 0 !important; }
.gallery-photo-cell > span { display: block; overflow: hidden; border: 1px solid #e4ebf3; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(20, 50, 82, .07); }
.gallery-photo-cell .thumb-info-wrapper { display: block; overflow: hidden; border-radius: 15px; }
.gallery-photo-cell .thumb-info-wrapper > img { display: block; width: 100% !important; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 0 !important; transition: transform .3s ease; }
.gallery-photo-cell > span:hover .thumb-info-wrapper > img { transform: scale(1.035); }
.gallery-empty-state { margin: 0 14px 24px; padding: 26px; border: 1px dashed #cbd9e8; border-radius: 16px; background: #fff; color: #43566b; }
.gallery-empty-state strong { color: #173c63; }
.gallery-empty-state p { margin: 8px 0 0; }
.gallery-back-link { margin: 26px 14px 0; text-align: right; }
.gallery-back-link a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid #dfe7f0; border-radius: 999px; background: #fff; color: #174875; text-decoration: none; }
.gallery-back-link a:hover { border-color: #0e62d4; color: #0e62d4; }
@media (max-width: 767.98px) {
  .gallery-folders-page .page-header h1, .gallery-photos-page .page-header h1 { font-size: 2em; }
  .gallery-section-title { font-size: 1.5em; }
  .gallery-grid { border-spacing: 8px !important; }
  .gallery-grid td { width: 50%; }
}
@media (max-width: 480px) {
  .gallery-grid { border-spacing: 6px !important; }
  .gallery-grid td { width: 100%; }
}

.gallery-photo-cell > .gallery-photo-link { display: block; color: inherit; text-decoration: none !important; }
.gallery-photo-cell > .gallery-photo-link { display: flex; height: 100%; flex-direction: column; overflow: hidden; border: 1px solid #e4ebf3; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(20,50,82,.08); transition: transform .2s ease, box-shadow .2s ease; }
.gallery-photo-thumbnail { margin: 10px 10px 0; border-radius: 12px 12px 0 0; box-shadow: 0 8px 16px rgba(23,60,99,.18); }
.gallery-photo-thumbnail > img { border-radius: 12px 12px 0 0 !important; }
.gallery-photo-caption { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #fff; }
.gallery-photo-name { min-width: 0; color: #173c63; font-size: .95rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; text-align: left; }
.gallery-photo-name i { margin-right: 8px; color: #2c3d63; }
.gallery-photo-action { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; color: #2c3d63; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.gallery-photo-link:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(20,50,82,.15); }
.gallery-photo-link:hover .gallery-photo-action { color: #2c3d63; }
.gallery-photo-thumbnail { position: relative; display: block; overflow: hidden; border-radius: 14px; background: #e8eef5; }
.gallery-photo-thumbnail > img { display: block; width: 100% !important; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease, filter .25s ease; }
.gallery-photo-open { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(23,60,99,.88); color: #fff; font-size: .8rem; font-weight: 700; box-shadow: 0 4px 14px rgba(5,20,38,.25); opacity: .96; transition: background .2s ease, transform .2s ease; }
.gallery-photo-link:hover .gallery-photo-thumbnail > img { transform: scale(1.035); filter: brightness(.92); }
.gallery-photo-link:hover .gallery-photo-open { transform: translateY(-2px); background: #1769a5; }
.gallery-photo-link:focus-visible { outline: 3px solid rgba(23,105,165,.45); outline-offset: 4px; border-radius: 14px; }
.gallery-lightbox { position: fixed; z-index: 30000; inset: 0; display: flex; align-items: center; justify-content: center; padding: 76px 88px 30px; background: rgba(8,18,32,.94); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.gallery-lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
body.gallery-viewer-open { overflow: hidden; }
.gallery-lightbox-content { display: flex; width: min(1100px, 100%); height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.gallery-lightbox-image { display: block; max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; border-radius: 8px; box-shadow: 0 18px 60px rgba(0,0,0,.42); }
.gallery-lightbox-caption { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 20px; color: #fff; font-size: .95rem; }
.gallery-lightbox-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.gallery-lightbox-count { flex: 0 0 auto; color: #c8d6e6; font-size: .85rem; }
.gallery-lightbox-close, .gallery-lightbox-nav { position: absolute; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.gallery-lightbox-close:hover, .gallery-lightbox-nav:hover { background: rgba(255,255,255,.24); color: #fff; }
.gallery-lightbox-close { top: 22px; right: 24px; width: 48px; height: 48px; border-radius: 50%; font-size: 1.25rem; }
.gallery-lightbox-nav { top: 50%; width: 52px; height: 64px; border-radius: 14px; font-size: 1.2rem; transform: translateY(-50%); }
.gallery-lightbox-prev { left: 22px; }
.gallery-lightbox-next { right: 22px; }
.gallery-lightbox button:focus-visible { outline: 3px solid #8ecbff; outline-offset: 3px; }
@media (max-width: 767.98px) {
  .gallery-lightbox { padding: 70px 16px 24px; }
  .gallery-lightbox-image { max-width: 100%; max-height: calc(100vh - 170px); }
  .gallery-lightbox-nav { top: auto; bottom: 18px; width: 46px; height: 46px; border-radius: 50%; transform: none; }
  .gallery-lightbox-prev { left: calc(50% - 56px); }
  .gallery-lightbox-next { right: calc(50% - 56px); }
  .gallery-lightbox-caption { padding-bottom: 54px; font-size: .85rem; }
}

/* Match gallery folder heading to the institutional content title. */
.gallery-photos-page .gallery-section-title { margin: 0 0 24px; color: #2c3d63 !important; font-size: 3.25em; font-weight: 800; letter-spacing: -.07em; line-height: 1.15; }
@media (max-width: 767px) { .gallery-photos-page .gallery-section-title { font-size: 2.3em; } }

.gallery-photos-page .gallery-section-title { margin-left: 14px; }

.gallery-folders-page .gallery-section-title { margin: 0 0 24px 14px; color: #2c3d63 !important; font-size: 3.25em; font-weight: 800; letter-spacing: -.07em; line-height: 1.15; }
@media (max-width: 767px) { .gallery-folders-page .gallery-section-title { font-size: 2.3em; } }
/* Editorial album grid matches the charcoal/red public site. */
.gallery-folders-page { background:#fff; }
.gallery-folders-page .gallery-container { padding-top:28px !important; }
.gallery-albums-heading { margin:0 0 28px; padding-bottom:24px; border-bottom:1px solid #e9e9e9; }
.gallery-albums-eyebrow { display:block; margin-bottom:10px; color:#cc331c; font-size:11px; font-weight:800; letter-spacing:.14em; }
.gallery-albums-heading .gallery-section-title { margin:0 0 8px; color:#2e2e2e; font-size:clamp(25px,2.5vw,32px); font-weight:700; letter-spacing:-.025em; }
.gallery-albums-heading p { margin:0; color:#777; font-size:14px; }
.gallery-album-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:30px 24px; }
.gallery-album-grid .gallery-folder-card { border:0; border-bottom:1px solid #e5e5e5; border-radius:0; box-shadow:none; background:#fff; }
.gallery-album-grid .gallery-folder-card:hover { transform:none; box-shadow:none; }
.gallery-album-grid .thumb-info-wrapper { margin:0; border-radius:0; box-shadow:none; aspect-ratio:4/3; background:#f4f4f4; }
.gallery-album-grid .thumb-info-wrapper img { border-radius:0 !important; }
.gallery-album-grid .gallery-folder-caption { padding:18px 0; min-height:88px; align-items:center; gap:12px; }
.gallery-album-info { display:flex; flex-direction:column; gap:6px; min-width:0; }
.gallery-album-grid .gallery-folder-name { color:#353535; font-size:16px; font-weight:700; }
.gallery-album-count { color:#858585; font-size:12px; }
.gallery-album-grid .gallery-folder-action,.gallery-album-grid .gallery-folder-card:hover .gallery-folder-action { color:#cc331c; font-size:12px; }
.gallery-album-grid .gallery-folder-card:focus-visible { outline:2px solid #cc331c; outline-offset:5px; }
@media(max-width:991px) { .gallery-album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:575px) { .gallery-album-grid { grid-template-columns:1fr; gap:24px; } }
@media(prefers-reduced-motion:reduce) { .gallery-album-grid img { transition:none !important; } }
.gallery-photos-page { background:#fff; }
.gallery-photos-page .gallery-container { padding-top:28px !important; }
.gallery-back-link { display:inline-block; margin:0 0 16px; color:#cc331c !important; font-size:12px; font-weight:700; }
.gallery-photo-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.gallery-photo-grid .gallery-photo-link { border:0; border-bottom:1px solid #e5e5e5; border-radius:0; box-shadow:none; }
.gallery-photo-grid .gallery-photo-link:hover { transform:none; box-shadow:none; }
.gallery-photo-grid .gallery-photo-thumbnail { margin:0; border-radius:0; box-shadow:none; }
.gallery-photo-grid .gallery-photo-thumbnail img { width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; border-radius:0 !important; }
.gallery-photo-grid .gallery-photo-caption { min-height:58px; padding:14px 0; }
.gallery-photo-grid .gallery-photo-name { color:#555; font-size:13px; font-weight:600; }
.gallery-photo-grid .gallery-photo-action,.gallery-photo-grid .gallery-photo-link:hover .gallery-photo-action { color:#cc331c; font-size:12px; }
.gallery-photos-page .gallery-lightbox { background:rgba(12,12,12,.96); }
.gallery-photos-page .gallery-lightbox-image,.gallery-photos-page .gallery-lightbox-nav,.gallery-photos-page .gallery-lightbox-close { border-radius:0; }
.gallery-photos-page .gallery-lightbox button:focus-visible,.gallery-photo-grid .gallery-photo-link:focus-visible { outline:2px solid #cc331c; outline-offset:4px; }
@media(max-width:991px) { .gallery-photo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:575px) { .gallery-photo-grid { grid-template-columns:1fr; gap:20px; } }
