/* gallery.css — trang Hình ảnh (/gallery): thư viện ảnh + video YouTube, khung polaroid.
   Chỉ cuộn, không nút lọc: mỗi mục 1 tiêu đề. Điện thoại 2 cột, máy tính 3 cột. Nội dung: admin "Thư viện ảnh & video".
   Hiệu ứng rê / bấm của khung (.ld-pol) nằm ở cuối style.css (nguyên tắc chung). */
body.gallery-page { max-width: 1080px; }
.gl { display: block; padding-bottom: 40px; }
.gl-title { padding-left: 0; padding-right: 0; }

.gl-grp { margin-top: 18px; scroll-margin-top: calc(var(--sh-h, 60px) + 12px); }
.gl-grp + .gl-grp { margin-top: 30px; }
.gl-gh { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-family: var(--t2-f, inherit); font-size: 1.125rem; font-weight: 800; letter-spacing: .02em; color: var(--t2-c, #fff); }
.gl-gh::after { content: ''; flex: 1; height: 1px; background: rgba(204, 182, 254, .35); }

.gl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; align-items: stretch; }

/* Khung polaroid: giống ảnh phòng ở Trang chủ, nhỏ lại cho vừa 2 cột */
.gl-pol { --r: -1.4deg; margin: 0; padding: 7px 7px 0; border-radius: 5px; background: var(--c-ph, #E9E0FD); box-shadow: 0 8px 16px rgba(10, 5, 40, .34); transform: rotate(var(--r)); }
.gl-pol:nth-child(even) { --r: 1.2deg; }
.gl-pol:nth-child(3n) { --r: -.5deg; }
.gl-media { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.gl-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; background: rgba(40, 29, 98, .18); }
.gl-pol figcaption { padding: 8px 4px 10px; font-family: var(--t4-f); font-size: 13px; font-weight: 700; line-height: 1.3; text-align: center; color: var(--c-text, #281D62); overflow-wrap: anywhere; }
.gl-pol:not(:has(figcaption)) { padding-bottom: 7px; }

/* Video: ảnh YouTube + nút Play tròn đè giữa */
.gl-vid .gl-media { cursor: pointer; }
.gl-play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(20, 10, 60, .62); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); pointer-events: none; transition: background-color .18s ease, scale .18s ease; }
.gl-play svg.ic { width: 24px; height: 24px; margin-left: 3px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) { .gl-vid:hover .gl-play { background: var(--c-brand, #0673FD); scale: 1.08; } }
.gl-media:focus-visible { outline: 3px solid var(--c-accent, #FEE362); outline-offset: 3px; border-radius: 4px; }

@media (min-width: 900px) {
  .gl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
  .gl-pol { padding: 10px 10px 0; border-radius: 6px; }
  .gl-pol:not(:has(figcaption)) { padding-bottom: 10px; }
  .gl-pol figcaption { padding: 10px 6px 12px; font-size: 14px; }
  .gl-gh { font-size: 1.375rem; margin-bottom: 18px; }
  .gl-grp + .gl-grp { margin-top: 44px; }
  .gl-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .gl-play svg.ic { width: 28px; height: 28px; }
}
