/* Cercador global (diàleg): s'usa a totes les pàgines web i a la franja web de cada fitxa. Només pantalla. Tokens amb valors per defecte perquè
   les pàgines de fitxa no carreguen site.css. */
.cg { position: fixed; inset: 0; z-index: 100; background: rgba(42, 35, 71, .5); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 1rem 1rem; font-family: var(--tipus-text, "Andika", system-ui, sans-serif); color: var(--ink, #2a2347); }
.cg[hidden] { display: none; }
.cg-caixa { width: min(42rem, 100%); max-height: 84vh; display: flex; flex-direction: column; background: #fff; border-radius: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); overflow: hidden; }
.cg-form { position: relative; display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line, #e8e2f5); margin: 0; }
.cg-form svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: var(--ink-2, #655f7d); stroke-width: 2.2; stroke-linecap: round; flex: none; }
.cg-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; border: 0; outline: 0; background: none; color: inherit; }
.cg-tanca { font: inherit; font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 6px; border: 1px solid var(--line, #e8e2f5); background: var(--bg, #ffffff); color: var(--ink-2, #655f7d); cursor: pointer; }
.cg-res { overflow-y: auto; padding: .4rem .8rem 1rem; overscroll-behavior: contain; text-align: left; }
.cerca-res.cg-res { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + .5rem); background: #fff; border-radius: 18px; border: 1px solid var(--line, #e8e2f5); box-shadow: 0 2px 4px rgba(42, 35, 71, .08), 0 14px 30px rgba(42, 35, 71, .13); max-height: min(70vh, 34rem); margin: 0; padding: .4rem .8rem 1rem; }
.cg-grup { margin-top: .6rem; }
.cg-grup h3 { margin: 0 0 .3rem; font-family: inherit; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2, #655f7d); }
.cg-llista { list-style: none; margin: 0; padding: 0; }
.cg-item { display: flex; align-items: center; gap: .8rem; padding: .35rem .5rem; border-radius: 12px; text-decoration: none; color: inherit; }
.cg-item:hover, .cg-item.sel, .cg-xips a.sel, .cg-tots.sel { background: var(--acento-suau, #f4efff); }
.cg-mini { flex: none; position: relative; display: grid; place-items: center; width: 2.9rem; height: 3.7rem; border-radius: 6px; overflow: hidden; background: var(--acento-suau, #f4efff); border: 1px solid var(--line, #e8e2f5); color: var(--acento, #3b2a80); }
.cg-mini img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cg-mini .svg-ico { width: 1.5rem; height: 1.5rem; }
.cg-text { display: grid; gap: .1rem; min-width: 0; }
.cg-text b { line-height: 1.2; }
.cg-text small { color: var(--ink-2, #655f7d); font-size: .8rem; }
.cg-xips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cg-xips a { --acento: var(--brand, #3b2a80); text-decoration: none; font-weight: 700; font-size: .88rem; color: var(--ink, #2a2347); padding: .3rem .85rem; border-radius: 999px; border: 1.5px solid var(--line, #e8e2f5); background: #fff; }
.cg-xips a:hover { border-color: var(--acento); color: var(--acento); }
.cg-tots { display: block; margin-top: .8rem; padding: .55rem; text-align: center; font-weight: 700; color: var(--brand-2-text, #6a45d6); text-decoration: none; border-radius: 12px; border: 1.5px solid var(--line, #e8e2f5); }
.cg-tots:hover { background: var(--bg, #ffffff); }
.cg-cap { margin: 1.2rem 0; text-align: center; color: var(--ink-2, #655f7d); }
body.cg-obert { overflow: hidden; }
@media (max-width: 600px) { .cg { padding-top: 3vh; } .cg-caixa { max-height: 92vh; } }
@media print { .cg { display: none !important; } }
