/* Banco de fotos gratis (tools/seo/build-fotos-gratis.js).
   Va después de dp-tools.css y blog-claro.css: usa sus variables. La galería ocupa todo el ancho (sin columna lateral). */

.dpt-article:has(.fg-wrap) { grid-template-columns: minmax(0, 1fr); }
.dpt-article:has(.fg-wrap) .dpt-aside { display: none; }
.dpt-prose:has(.fg-wrap) { max-width: none; }
.dpt-prose:has(.fg-wrap) > p, .dpt-prose:has(.fg-wrap) > ul, .dpt-prose:has(.fg-wrap) > ol,
.dpt-prose:has(.fg-wrap) > h2, .dpt-prose:has(.fg-wrap) > .dpt-callout { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barra: buscador, orientación y cantidad. */
.fg-wrap { margin: 8px 0 34px; }
.fg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.fg-search { flex: 1 1 280px; }
.fg-search input { width: 100%; min-height: 48px; padding: 0 18px; border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; font: inherit; font-size: 1rem; color: var(--ink); }
.fg-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.fg-orient, .fg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fg-orient button, .fg-chips button { min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink-2); font: 600 .9rem var(--body); cursor: pointer; }
.fg-orient button.is-on, .fg-chips button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fg-count { margin: 0 0 0 auto; font-size: .92rem; color: var(--muted); }
.fg-chips { margin-bottom: 18px; }

/* Grilla tipo mosaico: columnas que respetan el alto de cada foto. */
.fg-grid { columns: 4 260px; column-gap: 16px; }
.fg-item { break-inside: avoid; margin: 0 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fg-item[hidden] { display: none; }
.fg-open { display: block; width: 100%; padding: 0; border: 0; background: var(--bg-2); cursor: zoom-in; }
.fg-open img { display: block; width: 100%; height: auto; margin: 0; border-radius: 0; box-shadow: none; transition: opacity .15s; }
.fg-open:hover img { opacity: .9; }
.fg-item figcaption { display: grid; gap: 2px; padding: 12px 14px 14px; font-size: .9rem; line-height: 1.4; }
.fg-item figcaption strong { color: var(--ink); font-size: .98rem; }
.fg-item figcaption > span { color: var(--muted); }
.fg-dl { display: flex !important; gap: 6px; margin-top: 8px; }
.fg-dl a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 7px 6px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink); font-weight: 700; font-size: .88rem; text-decoration: none; line-height: 1.2; }
.fg-dl a:first-child { background: var(--brand); border-color: var(--brand); }
.fg-dl a:hover { border-color: var(--ink); }
.fg-dl small { font-weight: 500; font-size: .74rem; color: var(--ink-2); }
.fg-empty { padding: 20px; border-radius: 14px; background: var(--bg-2); }

/* Temas: tarjetas con foto. */
.fg-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 10px 0 30px; }
.fg-topic { display: grid; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.fg-topic:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.fg-topic img { width: 100%; height: 130px; object-fit: cover; margin: 0; border-radius: 0; }
.fg-topic strong { padding: 10px 14px 0; font-size: .98rem; line-height: 1.3; }
.fg-topic span { padding: 2px 14px 12px; font-size: .85rem; color: var(--muted); }

/* Licencia: sí / no. */
.fg-license { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 8px 0 14px; max-width: 900px; }
.fg-license > div { border-radius: var(--r); padding: 18px 20px; background: #fff; border: 1px solid var(--line); }
.fg-license h3 { margin: 0 0 8px; font-size: 1rem; }
.fg-license .is-yes h3 { color: var(--ok); }
.fg-license .is-no h3 { color: #b45309; }
.fg-license ul { margin: 0; padding-left: 20px; }
.fg-license li { margin-bottom: 6px; }
.fg-note { font-size: .92rem; color: var(--muted); }

/* Visor de una foto. */
.fg-lb { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(12, 10, 9, .88); }
.fg-lb[hidden] { display: none; }
.fg-lb__box { display: grid; gap: 12px; max-width: min(1100px, 100%); max-height: 100%; }
.fg-lb__box img { max-width: 100%; max-height: calc(100vh - 170px); width: auto; height: auto; margin: 0 auto; border-radius: 12px; background: #222; }
.fg-lb__info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; color: #fff; }
.fg-lb__info strong { font-size: 1.05rem; }
.fg-lb__info a.fg-lb__cat { color: var(--hl); font-size: .9rem; }
.fg-lb__actions { display: flex; gap: 8px; margin-left: auto; }
.fg-lb__actions a { min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--brand); color: var(--ink); font-weight: 700; text-decoration: none; }
.fg-lb__actions a + a { background: #fff; }
.fg-lb__close, .fg-lb__nav { position: absolute; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.6rem; width: 48px; height: 48px; cursor: pointer; }
.fg-lb__close { top: 14px; right: 14px; }
.fg-lb__nav { top: 50%; transform: translateY(-50%); }
.fg-lb__nav--prev { left: 12px; }
.fg-lb__nav--next { right: 12px; }

@media (max-width: 760px) {
  .fg-grid { columns: 2 150px; column-gap: 10px; }
  .fg-item { margin-bottom: 10px; border-radius: 12px; }
  .fg-item figcaption { padding: 10px; font-size: .82rem; }
  .fg-item figcaption > span:not(.fg-dl) { display: none; }
  .fg-dl small { display: none; }
  .fg-count { margin-left: 0; }
  .fg-license { grid-template-columns: 1fr; }
  .fg-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .fg-chips button { flex: none; }
  .fg-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fg-topic img { height: 100px; }
  .fg-lb { padding: 10px; }
  .fg-lb__nav { display: none; }
  .fg-lb__actions { margin-left: 0; }
}
