/* ═══ PROJECTES · SEMPRE BLANC (10 nov 2026) ═════════════════════════════════
   Portada de projectes (CA/ES/EN/FR/DE). Mateix exercici que el blog
   (blog-blanc.css, que també cobreix les 45 fitxes perquè són .article-page):
   · Fons de pàgina i de targetes: blanc (el catàleg era menta i la regla de
     «secció de tancament» de tokens.css pintava de menta les obres en curs).
   · Fotos de les targetes: un sol marc 16:10 per a totes (abans 180 o 240px
     segons si la targeta tenia segell Passivhaus; el mateix
     per al radi i l'aire sota la foto, que en mòbil faltaven a les que no en tenen).
   · Botó «Demanar pressupost»: contorn de marca, com el de la capçalera.
   · Titulí sense píndola.
   Cap text, foto ni estructura canviats.
   11 nov 2026 · Obres en curs passa a ser una pestanya del catàleg (proposta C, triada
   per l'usuari): vegeu el bloc «Obres en curs» al final. */

/* ── Fons blanc ──────────────────────────────────────────────────────────── */
html body #catalec.blog-cards-only.blog-cards-only:not(#pk-b1):not(#pk-b2) {
  --btn-ink: #002819; --btn-paper: #ffffff; /* botó: criteri únic */
  background: #ffffff !important;
  background-image: none !important;
}

/* ── Targetes: marc únic 16:10 ───────────────────────────────────────────── */
html body #catalec.blog-cards-only .rl-featured__card-visual {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
  aspect-ratio: 16 / 10 !important;
  background-size: cover !important;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 18px !important;
}

/* (12 nov 2026) Titulí i botó de la portada: tokens.css, CRITERI ÚNIC DE COMPONENTS. */

/* ═══ OBRES EN CURS · PESTANYA DEL CATÀLEG (proposta C, 11 nov 2026) ═════════
   Marcatge: BACKUPS/2026-11-11-obres-curs-c/apply_obres_curs_c.py.
   Filets: un sol filet verd a sobre de cada fase (el panell no en porta) i un filet
   menta a sobre de cada targeta; cap filet de tancament sota la darrera fila.
   Numeració: «Fase 1 de 4» + barres per a la fase; número gran = ordre de prelació. */
html body #catalec [hidden] { display: none !important; }

/* Botons de pestanya */
html body #catalec .pkC__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(32px, 3vw, 48px); }
html body #catalec .pkC__tab {
  display: inline-block; min-height: 46px; padding: 13px 20px; box-sizing: border-box; line-height: 20px; text-align: center;
  border: 0; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px #002819;
  color: #002819; font: inherit; font-size: 14px; font-weight: 400; letter-spacing: 0.02em; cursor: pointer;
  transition: background 250ms ease, color 250ms ease;
}
html body #catalec .pkC__tab:hover { background: #d9e4e0; }
html body #catalec .pkC__tab[aria-selected="true"] { background: #002819; color: #ffffff; }
html body #catalec .pkC__tab:focus-visible { outline: 2px solid #002819; outline-offset: 3px; }
html body #catalec .pkC__tab span { font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: 0.4em; }
html body #catalec .pkC__tab span::before { content: "| "; }

/* Panell: sense filet propi (el posava la secció antiga i es duplicava amb el de les fases) */
html body #catalec #en-curs.pkC__panel {
  border: 0 !important; background: none !important; padding: 0; margin: 0;
}

/* Fases: un filet verd per columna; «Fase 1 de 4» + barres, nom | recompte */
html body #catalec #en-curs.pkC__panel .pa-curs__phases {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(16px, 2vw, 32px); margin: 0;
}
html body #catalec #en-curs.pkC__panel .pa-curs__phase {
  display: block; position: relative; min-width: 0; margin: 0; padding: 14px 0 0;
  border: 0; border-top: 1px solid #002819; border-radius: 0; background: none; box-shadow: none;
  color: #002819; cursor: pointer; font-size: 16px; line-height: 1.3;
}
html body #catalec #en-curs.pkC__panel .pa-curs__phase:hover { background: none; color: #002819; }
html body #catalec #en-curs.pkC__panel .pa-curs__phase:hover .pa-curs__phase-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
html body #catalec #en-curs.pkC__panel .pa-curs__phase-num {
  display: block; margin: 0 0 8px; padding-right: 76px; font-size: 11.5px; font-weight: 400; line-height: 1.3;
  letter-spacing: 0.04em; text-transform: uppercase;
}
html body #catalec #en-curs.pkC__panel .pa-curs__phase > .pkC__track { position: absolute; top: 19px; right: 0; }
/* nom i recompte en una sola línia de text: «Llicència d'obres | 6» */
html body #catalec #en-curs.pkC__panel :is(.pa-curs__phase-name, .pa-curs__phase-count) {
  display: inline; margin: 0; font-size: 16px; font-weight: 400; hyphens: manual;
}
html body #catalec #en-curs.pkC__panel .pa-curs__phase-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
html body #catalec #en-curs.pkC__panel .pa-curs__phase-count::before { content: "| "; margin-left: 0.4em; }

/* Llegenda: explica la numeració abans de la graella */
html body #catalec #en-curs.pkC__panel .pa-curs__legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin: clamp(28px, 3vw, 40px) 0 14px;
  border: 0; font-size: 12.5px; font-weight: 400; color: #002819;
}

/* Barres de fase (mateix glif a la capçalera i a les targetes) */
html body #catalec .pkC__track { display: inline-grid; grid-template-columns: repeat(4, 16px); gap: 3px; }
html body #catalec .pkC__track i { height: 3px; border-radius: 2px; background: #d9e4e0; }
html body #catalec .pkC__track i.is-on { background: #002819; }

/* Targetes: número de prelació gran, barres, nom, fase */
html body #catalec .pkC__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(16px, 2vw, 32px);
}
html body #catalec .pkC__card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num track" "name name" "phase phase";
  align-items: center; align-content: start; row-gap: 6px; padding: 16px 0 24px; margin: 0;
  border: 0; border-top: 1px solid #d9e4e0; color: #002819;
}
html body #catalec .pkC__num { grid-area: num; font-size: 28px; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
html body #catalec .pkC__card > .pkC__track { grid-area: track; align-self: start; margin-top: 8px; }
html body #catalec .pkC__name { grid-area: name; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 17px; font-weight: 400; line-height: 1.25; }
html body #catalec .pkC__name .pa-curs__dot { display: inline-block; }
html body #catalec .pkC__phase { grid-area: phase; font-size: 11.5px; font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; }
html body #catalec .pkC__card--you { grid-template-areas: "num num" "name name" "cta cta"; }
html body #catalec .pkC__cta {
  grid-area: cta; justify-self: start; display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 14px; margin-top: 4px; border-radius: 8px; box-shadow: inset 0 0 0 1px #002819;
  color: #002819; font-size: 12.5px; font-weight: 400; text-decoration: none; white-space: nowrap;
  transition: background 250ms ease, color 250ms ease;
}
html body #catalec .pkC__cta:hover { background: #002819; color: #ffffff; }

@media (max-width: 1040px) {
  html body #catalec #en-curs.pkC__panel .pa-curs__phases { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  html body #catalec .pkC__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  html body #catalec .pkC__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Mòbil: targetes en files (número | nom i fase | barres) */
@media (max-width: 600px) {
  html body #catalec .pkC__tabs { flex-wrap: nowrap; }
  html body #catalec .pkC__tab { flex: 1 1 0; display: block; align-content: center; padding: 8px 10px; font-size: 13px; line-height: 1.25; }
  html body #catalec #en-curs.pkC__panel .pa-curs__phase-num { padding-right: 0; }
  html body #catalec #en-curs.pkC__panel .pa-curs__phase > .pkC__track { position: static; display: grid; width: max-content; margin: 0 0 10px; }
  html body #catalec .pkC__grid { grid-template-columns: minmax(0, 1fr); }
  html body #catalec .pkC__card {
    grid-template-columns: 2.4em minmax(0, 1fr) auto; grid-template-areas: "num name track" "num phase track";
    column-gap: 10px; row-gap: 2px; padding: 12px 0;
  }
  html body #catalec .pkC__num { font-size: 20px; margin: 0; }
  html body #catalec .pkC__card > .pkC__track { align-self: center; margin: 0; }
  html body #catalec .pkC__name { font-size: 15px; }
  html body #catalec .pkC__card--you { grid-template-areas: "num name cta"; }
  html body #catalec .pkC__cta { margin: 0; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  html body #catalec :is(.pkC__tab, .pkC__cta) { transition: none; }
}
