/* Galería de fotos de las páginas /tempo-a/ y /tempo-b/ (solo la cargan esas dos).
   Todas las clases empiezan con "tg-" para no chocar con el resto del sitio. */

/* Destacadas: una grande + tres chicas */
.tg-top{position:relative}
.tg-hero{display:grid;grid-template-columns:2fr 1fr 1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;height:clamp(380px,42vw,500px);border-radius:var(--r,22px);overflow:hidden}
.tg-hero a:first-child{grid-row:span 2}
.tg-hero a:nth-child(2){grid-column:span 2}
.tg-all{position:absolute;right:16px;bottom:16px;padding:10px 18px;font-size:15px;box-shadow:0 4px 16px rgba(43,29,22,.18)}

/* Miniaturas (destacadas y ambientes) */
.tg-ph{display:block;position:relative;overflow:hidden;background:var(--line,#eadfd3);cursor:zoom-in}
.tg-ph img{width:100%;height:100%;object-fit:cover;transition:transform .45s ease}
.tg-ph:hover img{transform:scale(1.035)}
.tg-ph:focus-visible{outline:3px solid var(--brand,#a23b22);outline-offset:2px}

/* Galería completa por ambientes */
.tg-full{margin-top:52px;scroll-margin-top:84px}
.tg-full>h2{font-size:clamp(28px,4vw,38px);text-wrap:balance}
.tg-nav{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 8px}
.tg-nav a{background:var(--card,#fff);border:1px solid var(--line,#eadfd3);border-radius:999px;padding:7px 14px;font-size:14px;font-weight:500;text-decoration:none;color:var(--ink,#2b1d16)}
.tg-nav a:hover{border-color:var(--brand,#a23b22);color:var(--brand,#a23b22)}
.tg-nav span{color:var(--mute,#6f5a4d);margin-left:4px}
.tg-sec{margin-top:36px;scroll-margin-top:84px}
.tg-sec-h{display:flex;align-items:baseline;gap:12px;margin-bottom:14px}
.tg-sec-h h3{font-size:24px}
.tg-sec-h span{font-size:14px;color:var(--mute,#6f5a4d);white-space:nowrap}
.tg-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.tg-row .tg-ph{aspect-ratio:4/3;border-radius:14px}

/* Visor ampliado */
.tg-lb{border:0;padding:0;margin:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;background:rgba(24,16,12,.96);color:#fff}
.tg-lb::backdrop{background:rgba(24,16,12,.96)}
.tg-lb figure{margin:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 72px 20px}
.tg-lb img{max-width:100%;max-height:calc(100% - 52px);object-fit:contain;border-radius:8px;user-select:none}
.tg-lb figcaption{margin-top:14px;font-size:15px;text-align:center;color:#e9dccf;max-width:760px}
.tg-lb figcaption b{display:block;font-weight:500;font-size:13px;letter-spacing:.06em;color:#cdbdae;margin-bottom:2px}
.tg-lb button{position:absolute;border:0;background:rgba(255,255,255,.14);color:#fff;width:48px;height:48px;border-radius:999px;font-size:26px;line-height:1;cursor:pointer;display:grid;place-items:center}
.tg-lb button:hover{background:rgba(255,255,255,.26)}
.tg-lb button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.tg-x{top:14px;right:14px}
.tg-prev{left:14px;top:50%;transform:translateY(-50%)}
.tg-next{right:14px;top:50%;transform:translateY(-50%)}

@media(max-width:700px){
  .tg-hero{grid-template-columns:repeat(3,1fr);grid-template-rows:none;height:auto;gap:6px;border-radius:18px}
  .tg-hero a:first-child{grid-column:1/-1;grid-row:auto;aspect-ratio:4/3}
  .tg-hero a:nth-child(2){grid-column:auto}
  .tg-hero a:nth-child(n+2){aspect-ratio:1}
  .tg-all{position:static;display:flex;width:100%;margin-top:10px;box-shadow:none}
  .tg-full{margin-top:40px}
  .tg-full>h2{font-size:27px}
  .tg-sec-h h3{font-size:21px}
  /* En el celular cada ambiente es una fila que se desliza de costado */
  .tg-row{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:78%;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -20px;padding:0 20px 6px;scroll-padding:0 20px;scrollbar-width:none}
  .tg-row::-webkit-scrollbar{display:none}
  .tg-row .tg-ph{scroll-snap-align:start}
  .tg-lb figure{padding:60px 8px 84px}
  .tg-lb img{max-height:calc(100% - 64px);border-radius:4px}
  .tg-prev,.tg-next{top:auto;bottom:18px;transform:none}
  .tg-prev{left:calc(50% - 60px)}.tg-next{right:calc(50% - 60px)}
}
@media(prefers-reduced-motion:reduce){.tg-ph img{transition:none}.tg-ph:hover img{transform:none}}
