/* Gallery only; retain YamHub's Roboto/Poppins typography and green palette. */
.yh-gallery { padding-top: 48px; padding-bottom: 48px; color: #555; font-family: Roboto, sans-serif; }
.yh-gallery-intro { margin-bottom: 26px; max-width: 900px; }
.yh-gallery .yh-gallery-intro h1 { margin: 0 0 18px; color: #28a745; font-family: Poppins, sans-serif; font-size: clamp(30px, 3.2vw, 46px); font-weight: 500; line-height: 1.2; }
.yh-gallery-intro p { margin: 0; font-size: 17px; line-height: 1.7; }
.yh-gallery a { color: #1b5e20; }
.yh-gallery a:hover { color: #33691e; }
.yh-gallery a:focus-visible, .yh-gallery button:focus-visible, .yh-gallery input:focus-visible, .yh-gallery select:focus-visible, .yh-gallery-dialog a:focus-visible, .yh-gallery-dialog button:focus-visible { outline: 3px solid #28a745; outline-offset: 3px; }
.yh-gallery-filters { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 22px; background: #f0f6ee; border: 1px solid #dce4d9; border-radius: 8px; }
.yh-gallery-field { flex: 1 1 185px; }
.yh-gallery-field-search { flex: 2 1 280px; }
.yh-gallery-field-size { flex: 0 1 145px; }
.yh-gallery-field label { display: block; margin: 0 0 7px; color: #364633; font-size: 14px; font-weight: 600; }
.yh-gallery-field input, .yh-gallery-field select { display: block; width: 100%; height: 45px; padding: 9px 11px; border: 1px solid #bdcbb9; border-radius: 4px; background: #fff; color: #333; font: inherit; font-size: 15px; }
.yh-gallery-filter-actions { display: flex; align-items: center; gap: 12px; flex: 1 0 auto; }
.yh-gallery-filter-actions .btn { min-height: 45px; font-size: 15px; padding: 10px 18px; }
.yh-gallery-filter-actions a { font-size: 14px; text-decoration: underline; }
.yh-gallery-results { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 28px; margin: 23px 0 18px; }
.yh-gallery-results > p { margin: 0; line-height: 1.5; }
.yh-gallery-results > p:first-child { white-space: nowrap; }
.yh-gallery-help { max-width: 720px; font-size: 14px; color: #666; }
.yh-gallery-entries { display: grid; gap: 25px; }
.yh-gallery-card { min-width: 0; padding: 23px; border: 1px solid #dce4d9; border-radius: 8px; background: #fff; box-shadow: 0 3px 12px rgba(32, 63, 24, .035); }
.yh-gallery-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.yh-gallery-card h2 { margin: 0 0 7px; color: #1b5e20; font-family: Poppins, sans-serif; font-weight: 500; font-size: 23px; line-height: 1.35; overflow-wrap: anywhere; }
.yh-gallery-card h2 a:hover { text-decoration: underline; }
.yh-gallery-entry-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 13px; margin: 0; font-size: 14px; line-height: 1.5; }
.yh-gallery-entry-meta > span + span::before, .yh-gallery-entry-meta > i + span::before { content: '·'; display: inline-block; margin-right: 13px; color: #869680; }
.yh-gallery-entry-id { color: #747d70; font-size: 12px; }
.yh-gallery-card-actions { display: flex; align-items: flex-end; flex-direction: column; flex-shrink: 0; gap: 6px; font-size: 14px; line-height: 1.5; }
.yh-gallery-card-actions a { text-decoration: underline; text-underline-offset: 3px; }
.yh-gallery-card-actions .yh-gallery-profile { font-weight: 600; }
.yh-gallery-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 16px; margin-top: 20px; }
.yh-gallery-photo { margin: 0; max-width: 100%; min-width: 0; }
.yh-gallery-photo-link { position: relative; display: flex; align-items: center; justify-content: center; height: 220px; overflow: hidden; border: 1px solid #e1e7de; border-radius: 5px; background: #f5f7f4; }
.yh-gallery-photo img { display: block; width: 100%; height: 100%; object-fit: contain; transition: filter .2s ease; }
.yh-gallery-photo-link:hover img { filter: brightness(.97); }
.yh-gallery-enlarge { position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; width: 30px; height: 30px; color: #fff; background: rgba(27, 94, 32, .9); border-radius: 50%; font-size: 13px; }
.yh-gallery-photo figcaption { margin-top: 8px; text-align: center; font-size: 14px; line-height: 1.4; color: #555; }
.yh-gallery-no-photo { margin: 16px 0 0; padding-top: 13px; border-top: 1px solid #edf0ea; color: #737b6f; font-size: 14px; }
.yh-gallery-state { padding: 28px; margin: 24px 0; background: #f0f6ee; border: 1px solid #dce4d9; border-radius: 6px; }
.yh-gallery-state h2 { font-size: 22px; font-family: Poppins, sans-serif; font-weight: 500; color: #1b5e20; }
.yh-gallery-state p { margin: 10px 0 0; }
.yh-gallery-pagination { margin: 30px 0 0; text-align: center; }
.yh-gallery-pagination ul { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.yh-gallery-pagination li { margin: 0; }
.yh-gallery-pagination a, .yh-gallery-pagination li > span { display: block; min-width: 40px; padding: 9px 12px; border: 1px solid #dce4d9; border-radius: 4px; line-height: 1.3; font-size: 14px; }
.yh-gallery-pagination a:hover { background: #f0f6ee; text-decoration: none; }
.yh-gallery-pagination .is-current { background: #28a745; color: #fff; border-color: #28a745; font-weight: 600; }
.yh-gallery-pagination .is-disabled { color: #777; background: #f6f7f5; }
.yh-gallery-pagination .yh-gallery-ellipsis > span { border-color: transparent; padding-left: 3px; padding-right: 3px; min-width: 20px; }
.yh-gallery-pagination > p { margin: 12px 0 0; font-size: 13px; color: #6a7365; }
.yh-gallery-dialog { width: min(1120px, 94vw); max-width: 94vw; max-height: 94vh; padding: 16px; border: 0; border-radius: 8px; box-shadow: 0 12px 70px rgba(0,0,0,.35); background: #fff; color: #333; }
.yh-gallery-dialog:not([open]) { display: none; }
.yh-gallery-dialog::backdrop { background: rgba(12, 28, 12, .8); }
.yh-gallery-dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.yh-gallery-dialog-toolbar a { color: #1b5e20; text-decoration: underline; font-size: 14px; }
.yh-gallery-dialog-toolbar button { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 1px solid #dce4d9; border-radius: 50%; background: #f0f6ee; color: #1b5e20; font-size: 30px; line-height: 1; cursor: pointer; }
.yh-gallery-dialog figure { margin: 0; }
.yh-gallery-dialog figure img { display: block; margin: 0 auto; width: auto; height: auto; max-width: 100%; max-height: 72vh; object-fit: contain; }
.yh-gallery-dialog figcaption { margin: 13px 0 0; text-align: center; line-height: 1.5; font-size: 16px; }
body.yh-gallery-dialog-open { overflow: hidden; }
@media (min-width: 992px) { .yh-gallery-photo-grid:has(> :only-child) { grid-template-columns: minmax(240px, 400px); } }
@media (max-width: 767px) {
    .yh-gallery { padding-top: 30px; padding-bottom: 30px; }
    .yh-gallery-filters { padding: 17px; gap: 14px; }
    .yh-gallery-field-search { flex-basis: 100%; }
    .yh-gallery-results { flex-direction: column; gap: 7px; }
    .yh-gallery-card { padding: 17px; }
    .yh-gallery-card-heading { flex-direction: column; gap: 11px; }
    .yh-gallery-card-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 7px 20px; }
    .yh-gallery-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .yh-gallery-photo-link { height: 190px; }
}
@media (max-width: 420px) {
    .yh-gallery-photo-link { height: 155px; }
    .yh-gallery-filter-actions { flex-wrap: wrap; }
    .yh-gallery-pagination a, .yh-gallery-pagination li > span { min-width: 32px; padding: 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .yh-gallery-photo img { transition: none; } }
