/* Graella lliure de la portada de l'Àgora. FITXER BESSÓ: web-llotja/agora/graella.css (a la web) i apps/web/components/web/graella.css (a l'editor).
   Si en canvies un, copia'l a l'altre. 12 columnes; cada casella diu x, y, w, a (files de 40 px, es poden partir: aquí les files són mitges).
   En pantalles més estretes les files s'encongeixen amb l'amplada, perquè les fotos no canviïn de forma. */
.gl-w { container-type: inline-size; }
.gl { --gl-titol: 'Arial Nova', Arial, 'Helvetica Neue', sans-serif; --gl-text: 'Aileron', Arial, sans-serif; --gl-col: 18px; --gl-fila: 20px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 20px; grid-auto-rows: max(16px, min(20px, 1.5152cqw)); column-gap: var(--gl-col); margin-bottom: calc(var(--gl-fila) * -1); }
.gl-c { position: relative; min-width: 0; padding-bottom: var(--gl-fila); box-sizing: border-box; }
.gl-i { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; overflow: hidden; text-decoration: none; color: #3e3a37; background: #f4f4f4; font-family: var(--gl-text); min-width: 0; }
.gl-f { display: block; flex: 1 1 0; min-height: 0; min-width: 0; background: #701a1f; overflow: hidden; }
.gl-f img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gl-t { display: flex; flex-direction: column; gap: 7px; padding: 12px 15px 14px; min-width: 0; box-sizing: border-box; flex: none; max-height: 100%; overflow: hidden; }
.gl-t > * { flex: none; }
.gl-s { font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: #701a1f; line-height: 1.3; }
.gl-h { font-family: var(--gl-titol); font-weight: 400; font-size: var(--gl-m, 20px); line-height: 1.2; letter-spacing: -.015em; color: #1c1c1c; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
.gl-e { font-size: 15px; line-height: 1.55; color: #777; margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.gl-a { font-size: 13px; color: #777; line-height: 1.35; }
.gl-b { align-self: flex-start; margin-top: 4px; background: #8a1f2b; color: #fff; font-size: 14px; letter-spacing: .04em; padding: 11px 24px; font-weight: 400; }
.gl-mida-s { --gl-m: 17px; } .gl-mida-m { --gl-m: 20px; } .gl-mida-l { --gl-m: 27px; } .gl-mida-xl { --gl-m: clamp(27px, 2.7vw, 38px); }
.gl-centre .gl-t { text-align: center; align-items: center; } .gl-centre .gl-b { align-self: center; }
.gl-foto-baix { flex-direction: column-reverse; }
.gl-foto-baix .gl-f { margin: 0; }
.gl-foto-esquerra { flex-direction: row; } .gl-foto-dreta { flex-direction: row-reverse; }
.gl-foto-esquerra .gl-f, .gl-foto-dreta .gl-f { flex: 0 0 var(--gl-tall, 52%); height: auto; }
/* El text ocupa el que necessita i la foto, tota la resta: mai no queda un blanc entremig */
:is(.gl-foto-dalt, .gl-foto-baix) .gl-t { max-height: 80%; }
.gl-tall:is(.gl-foto-dalt, .gl-foto-baix) .gl-t { max-height: calc(100% - var(--gl-tall)); min-height: 0 !important; }
.gl-foto-esquerra .gl-t, .gl-foto-dreta .gl-t { flex: 1; justify-content: center; padding: 14px 20px; }
.gl-foto-no .gl-t { flex: 1; justify-content: center; }
/* Sense foto i ample: el títol en una columna i l'entradeta i el botó a l'altra */
.gl-dos .gl-t { flex-direction: row; align-items: center; gap: clamp(24px, 4cqw, 56px); padding-top: 6px; padding-bottom: 6px; }
.gl-dos .gl-t > span { display: flex; flex-direction: column; gap: 7px; flex: 1 1 0; min-width: 0; }
.gl-dos .gl-t > span > * { flex: none; }
.gl-dos .gl-e { color: #3e3a37; font-size: 16px; line-height: 1.65; }
.gl-fons-granat.gl-dos .gl-e, .gl-fons-negre.gl-dos .gl-e { color: #fff; }
.gl-foto-fons { position: relative; justify-content: flex-end; }
.gl-foto-fons .gl-f { position: absolute; inset: 0; }
.gl-foto-fons .gl-f::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 25%, rgba(0, 0, 0, .78)); }
.gl-foto-fons .gl-t { position: relative; padding: 20px 22px 22px; }
.gl-foto-fons :is(.gl-s, .gl-h, .gl-e, .gl-a), .gl-fons-granat :is(.gl-s, .gl-h, .gl-e, .gl-a), .gl-fons-negre :is(.gl-s, .gl-h, .gl-e, .gl-a) { color: #fff; }
.gl-fons-cap { background: none; } .gl-fons-blanc { background: #fff; } .gl-fons-gris2 { background: #ededed; } .gl-fons-rosat { background: #f7eeee; } .gl-fons-granat { background: #701a1f; } .gl-fons-negre { background: #1c1c1c; }
.gl-fons-cap:not(.gl-foto-fons) .gl-t { padding-left: 2px; padding-right: 2px; }
.gl-fons-granat .gl-b { background: #fff; color: #701a1f; }
.gl-text { justify-content: center; padding: 14px 20px; }
.gl-text p { font-style: italic; font-size: var(--gl-m, 21px); line-height: 1.4; color: #a0342f; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.gl-text small { font-size: 13px; color: #777; margin-top: 8px; }
.gl-text.gl-centre { text-align: center; }
.gl-fons-granat.gl-text :is(p, small), .gl-fons-negre.gl-text :is(p, small) { color: #fff; }
.gl-imatge { background: none; position: relative; } .gl-imatge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gl-linia { background: none; align-items: center; justify-content: center; }
.gl-linia::before { content: ''; width: 100%; border-top: var(--gl-g, 1px) var(--gl-st, solid) var(--gl-cl, #ccc); } .gl-linia.gl-vert::before { width: 0; height: 100%; border-top: 0; border-left: var(--gl-g, 1px) var(--gl-st, solid) var(--gl-cl, #ccc); }
a.gl-i { transition: transform .2s ease, box-shadow .2s ease; } a.gl-i:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .08); } a.gl-i.gl-fons-cap:hover { box-shadow: none; }

/* Línies entre targetes: un sol traç (les calcula liniesDe), amb aire a banda i banda. Forma i color van a part. */
.gl-sep { --gl-col: 48px; --gl-fila: 40px; } .gl-sep.gl-sentit-h { --gl-col: 28px; } .gl-sep.gl-sentit-v { --gl-fila: 20px; }
.gl-ln { pointer-events: none; min-width: 0; }
.gl-ln-v { width: 0; justify-self: start; margin: 0 0 var(--gl-fila) calc(var(--gl-col) / -2); border-left: var(--gl-g, 1px) var(--gl-st, solid) var(--gl-cl, #ccc); transform: translateX(-50%); }
.gl-ln-h { height: 0; align-self: start; margin-top: calc(var(--gl-fila) / -2); border-top: var(--gl-g, 1px) var(--gl-st, solid) var(--gl-cl, #ccc); transform: translateY(-50%); }
.gl-f-punts { --gl-g: 2px; --gl-st: dotted; } .gl-f-guions { --gl-st: dashed; }
.gl-k-negre { --gl-cl: #1c1c1c; } .gl-k-granat { --gl-cl: #701a1f; }

/* Només a la web: per sota de 1040 px les targetes van una sota l'altra, en ordre de lectura */
@media (max-width: 1039px) {
  .gl { display: flex; flex-direction: column; margin-bottom: 0; }
  .gl-c { grid-area: auto !important; order: var(--gl-o, 0); }
  .gl-c.gl-buida { display: none; }
  .gl-i { height: auto; }
  .gl-t { min-height: 0 !important; flex: none !important; max-height: none !important; }
  .gl-i:not(.gl-foto-fons) > .gl-f { flex: none !important; aspect-ratio: 16 / 10; }
  .gl-foto-esquerra, .gl-foto-dreta, .gl-foto-baix { flex-direction: column; }
  .gl-foto-esquerra .gl-t, .gl-foto-dreta .gl-t { padding: 15px 17px 17px; }
  .gl-dos .gl-t { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 12px; padding-bottom: 14px; }
  .gl-dos .gl-t > span { flex: none; }
  .gl-foto-fons { min-height: 300px; }
  .gl-mida-l, .gl-mida-xl { --gl-m: 26px; }
  .gl-imatge img { height: auto; }
  .gl-ln { display: none; }
  .gl-sep .gl-c::after { content: ''; position: absolute; left: 0; right: 0; top: calc(var(--gl-fila) / -2); border-top: var(--gl-g, 1px) var(--gl-st, solid) var(--gl-cl, #ccc); }
  .gl-sep .gl-c.gl-primera::after { display: none; }
}
@media (min-width: 560px) and (max-width: 1039px) {
  .gl { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .gl-c.gl-gran { grid-column: 1 / -1 !important; }
}
