/* Home · Galería en mosaico + visor */
.tw-gal{background:#fff;padding:88px 0 96px;font-family:"Open Sans",sans-serif}
.tw-gal-cab{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;margin-bottom:36px}
.tw-gal-et{display:inline-flex;align-items:center;gap:8px;font:600 12px/1 "Open Sans",sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#1c63b8;margin-bottom:14px}
.tw-gal-et:before{content:"";width:22px;height:2px;background:#1c63b8;border-radius:2px}
.tw-gal-cab h2{font:600 38px/1.2 Poppins,sans-serif;letter-spacing:-.01em;color:#1b2230;margin:0;text-transform:none}
.tw-gal-cab p{max-width:380px;font-size:16px;line-height:1.7;color:#667085;margin:0}

.tw-gal-grid{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:210px;gap:14px}
.tw-gal-item{position:relative;display:block;border-radius:18px;overflow:hidden;background:#e9eef5;isolation:isolate;outline:none}
.tw-gal-item:nth-child(1){grid-column:span 2;grid-row:span 2}
.tw-gal-item:nth-child(6),.tw-gal-item:nth-child(9),.tw-gal-item:nth-child(10){grid-column:span 2}
.tw-gal-item img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .7s cubic-bezier(.2,.7,.2,1)}
.tw-gal-item:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(28,99,184,.08),rgba(15,27,51,.45));opacity:0;transition:opacity .35s}
.tw-gal-cap{position:absolute;right:14px;bottom:14px;z-index:1;display:flex;align-items:center;justify-content:flex-end;gap:12px;color:#fff;font-weight:600;font-size:14.5px;line-height:1.35;opacity:0;transform:translateY(8px);transition:opacity .35s,transform .35s}
.tw-gal-cap i{flex:none;width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:rgba(255,255,255,.18);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.tw-gal-cap svg{width:16px;height:16px}
.tw-gal-item:hover img,.tw-gal-item:focus-visible img{transform:scale(1.06)}
.tw-gal-item:hover:after,.tw-gal-item:focus-visible:after,.tw-gal-item:hover .tw-gal-cap,.tw-gal-item:focus-visible .tw-gal-cap{opacity:1;transform:none}
.tw-gal-item:focus-visible{box-shadow:0 0 0 3px #fff,0 0 0 6px #1c63b8}
.tw-gal-item:nth-child(1) .tw-gal-cap{right:20px;bottom:20px}

@media (max-width:991px){
  .tw-gal-grid{grid-auto-rows:170px}
  .tw-gal-cab{flex-direction:column;align-items:flex-start;gap:12px}
}
@media (max-width:600px){
  .tw-gal{padding:60px 0 64px}
  .tw-gal-cab h2{font-size:30px}
  .tw-gal-cab p{font-size:15.5px}
  .tw-gal-grid{grid-template-columns:repeat(2,1fr);grid-auto-rows:140px;gap:10px}
  .tw-gal-item{border-radius:14px}
  .tw-gal-item:nth-child(1){grid-column:span 2;grid-row:span 2}
  .tw-gal-item:nth-child(9),.tw-gal-item:nth-child(10){grid-column:span 1}
  /* en táctil no hay hover: se ve siempre el icono de ampliar, sin el texto */
  .tw-gal-cap{opacity:1;transform:none;right:10px;bottom:10px}
  .tw-gal-cap i{width:30px;height:30px;border-radius:9px}
}

/* Visor */
.tw-lb{position:fixed;inset:0;z-index:10050;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(9,16,31,.94);opacity:0;visibility:hidden;transition:opacity .3s,visibility 0s linear .3s;font-family:"Open Sans",sans-serif;color:#fff;padding:64px 16px 24px}
.tw-lb.abierto{opacity:1;visibility:visible;transition:opacity .3s}
.tw-lb figure{margin:0;max-width:min(1100px,100%);display:flex;flex-direction:column;align-items:center}
.tw-lb img{max-width:100%;max-height:calc(100vh - 170px);max-height:calc(100dvh - 170px);border-radius:14px;display:block;box-shadow:0 30px 80px -30px rgba(0,0,0,.8);transition:opacity .25s,transform .35s cubic-bezier(.2,.7,.2,1)}
.tw-lb img.cambiando{opacity:0;transform:scale(.98)}
.tw-lb figcaption{margin-top:16px;display:flex;gap:14px;align-items:center;font-size:15px;color:#dbe5f3}
.tw-lb figcaption b{font:600 13px/1 Poppins,sans-serif;color:#6fa6ec;letter-spacing:.04em}
.tw-lb button{position:absolute;border:0;cursor:pointer;display:grid;place-items:center;color:#fff;background:rgba(255,255,255,.1);border-radius:14px;transition:background .2s;padding:0}
.tw-lb button:hover{background:rgba(255,255,255,.2)}
.tw-lb button:focus-visible{box-shadow:0 0 0 3px #6fa6ec;outline:0}
.tw-lb button svg{width:22px;height:22px}
.tw-lb .cerrar{top:16px;right:16px;width:46px;height:46px}
.tw-lb .ant,.tw-lb .sig{top:50%;transform:translateY(-50%);width:52px;height:52px;border-radius:50%}
.tw-lb .ant{left:20px}
.tw-lb .sig{right:20px}
@media (max-width:600px){
  .tw-lb{padding:70px 10px 20px}
  .tw-lb img{max-height:calc(100dvh - 200px);border-radius:10px}
  .tw-lb .ant,.tw-lb .sig{top:auto;bottom:18px;transform:none;width:48px;height:48px}
  .tw-lb .ant{left:16px}.tw-lb .sig{right:16px}
  .tw-lb figcaption{flex-direction:column;gap:6px;text-align:center;padding:0 60px}
}
html.tw-lb-on,html.tw-lb-on body{overflow:hidden}
