/* bombers.es — identidad visual sobre Cassiopeia (plantilla hija cassiopeia_bombers) */
:root {
  --bx-red: #C4161C; --bx-red-dark: #8E0F14; --bx-yellow: #F5B400; --bx-ink: #1d1d1f; --bx-bg: #f6f6f4;
  --cassiopeia-color-primary: var(--bx-ink);
  --cassiopeia-color-link: var(--bx-red);
  --cassiopeia-color-hover: var(--bx-red-dark);
  --cassiopeia-font-family-body: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cassiopeia-font-family-headings: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cassiopeia-font-weight-headings: 800;
}
body { background: var(--bx-bg); color: var(--bx-ink); }
a { text-underline-offset: .15em; }

/* Cabecera */
.container-header { background: var(--bx-ink); box-shadow: inset 0 -4px 0 var(--bx-red); }
.container-header .navbar-brand { padding-block: .6rem; }
.container-header .navbar-brand img { height: 46px; width: auto; }
.container-header .site-description { color: #c9c9c9; font-size: .85rem; }
.container-header .mod-menu > li > a, .container-header .mod-menu > li > span,
.container-header .metismenu > li > a, .container-header .metismenu > li > button { color: #fff; font-weight: 600; }
.container-header .metismenu > li.active > a, .container-header .metismenu > li > a:hover { color: var(--bx-yellow); }
.container-header .metismenu .mm-collapse { background: #fff; border-top: 3px solid var(--bx-red); border-radius: 0 0 8px 8px; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.container-header .metismenu .mm-collapse a { color: var(--bx-ink); }
.container-header .metismenu .mm-collapse a:hover { color: var(--bx-red); background: #fbeaea; }

/* Botones */
.btn-primary { --btn-bg: var(--bx-red); --btn-border-color: var(--bx-red); background: var(--bx-red); border-color: var(--bx-red); }
.btn-primary:hover { background: var(--bx-red-dark); border-color: var(--bx-red-dark); }

/* Portada: bloque de convocatoria */
.bx-hero { position: relative; overflow: hidden; border-radius: 16px; padding: clamp(1.5rem, 4vw, 3rem);
  background: radial-gradient(120% 140% at 100% 0, #F26A1B 0, var(--bx-red) 40%, var(--bx-red-dark) 100%); color: #fff; }
.bx-hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 260px; height: 260px;
  background: url("../images/joomla-favicon.svg") no-repeat center / contain; opacity: .12; }
.bx-hero .bx-kicker { display: inline-block; background: var(--bx-yellow); color: var(--bx-ink); font-weight: 800;
  font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 4px; }
.bx-hero h2 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.6rem); margin: .6rem 0 .4rem; line-height: 1.15; }
.bx-hero p { max-width: 46rem; font-size: 1.1rem; color: #ffe9e6; }
.bx-hero .bx-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.bx-hero .bx-actions a { padding: .65rem 1.1rem; border-radius: 8px; font-weight: 700; text-decoration: none; }
.bx-hero .bx-actions a.bx-main { background: #fff; color: var(--bx-red-dark); }
.bx-hero .bx-actions a.bx-ghost { border: 2px solid rgba(255,255,255,.7); color: #fff; }
.bx-hero .bx-actions a:hover { filter: brightness(.95); }

/* Portada: «Comença aquí» */
.bx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.bx-cards a { display: block; height: 100%; padding: 1.2rem 1.3rem; background: #fff; border-radius: 12px; text-decoration: none;
  color: var(--bx-ink); border: 1px solid #e7e5e0; border-top: 4px solid var(--bx-red); transition: transform .15s, box-shadow .15s; }
.bx-cards a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.bx-cards strong { display: block; font-size: 1.15rem; margin-bottom: .25rem; }
.bx-cards span { color: #555; font-size: .95rem; }
.bx-section-title { font-size: 1.35rem; margin: 2rem 0 1rem; }

/* Listados de artículos como tarjetas */
.blog-featured .blog-items, .com-content-category-blog .blog-items { gap: 1rem; }
.blog-item { background: #fff; border: 1px solid #e7e5e0; border-radius: 12px; padding: 1.1rem 1.2rem; }
.blog-item .item-image img { border-radius: 8px; }
.blog-item h2 { font-size: 1.2rem; }
.com-content-article { background: #fff; border-radius: 12px; padding: clamp(1rem, 3vw, 2rem); border: 1px solid #e7e5e0; }

/* Pie */
.container-footer { background: var(--bx-ink); color: #cfcfcf; box-shadow: inset 0 4px 0 var(--bx-red); }
.container-footer a { color: #fff; }
.container-footer .nav-footer { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; list-style: none; padding: 0; margin: 0; }
.bx-footer-text { font-size: .9rem; }

/* Portada: destacados como tarjetas compactas */
.blog-featured .blog-item { display: flex; flex-direction: column; border-top: 4px solid var(--bx-yellow); }
.blog-featured .blog-item h2 a { color: var(--bx-ink); text-decoration: none; }
.blog-featured .blog-item h2 a:hover { color: var(--bx-red); }
.blog-featured .readmore { margin-top: auto; }
.blog-featured .article-info { font-size: .85rem; color: #666; }

/* Portada: módulo Articles (més consultats) */
.mod-articles-grid, .mod-articles-items { gap: 1rem; }
.mod-articles-item { background: #fff; border: 1px solid #e7e5e0; border-top: 4px solid var(--bx-yellow); border-radius: 12px; padding: 1rem 1.1rem; }
.mod-articles-item h3 { font-size: 1.1rem; margin: .2rem 0 .4rem; }
.mod-articles-item h3 a { color: var(--bx-ink); text-decoration: none; }
.mod-articles-item h3 a:hover { color: var(--bx-red); }
.mod-articles-item img { border-radius: 8px; max-height: 160px; width: 100%; object-fit: cover; }
.mod-articles-item .mod-articles-category { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bx-red); }
.com-content-featured.blog-featured:empty, .home-page .blog-featured .blog-items:empty { display: none; }

/* ===== Página de artículo: formato de lectura ===== */
.com-content-article { max-width: 860px; margin-inline: auto; padding: clamp(1.2rem, 4vw, 2.6rem); }
.com-content-article .page-header h1, .com-content-article h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; margin-bottom: .4rem; }
.com-content-article .article-info { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .85rem; margin: 0 0 1.2rem; }
.com-content-article .article-info .category-name a { display: inline-block; background: #fbeaea; color: var(--bx-red); padding: .15rem .6rem; border-radius: 999px; text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
.com-content-article .article-info dt, .com-content-article .article-info .icon-folder-open { display: none; }
.com-content-article .com-content-article__body { font-size: 1.08rem; line-height: 1.75; color: #2a2a2a; }
.com-content-article__body p { margin: 0 0 1.05em; text-align: left; }
.com-content-article__body h2, .com-content-article__body h3, .com-content-article__body h4 { margin: 1.8em 0 .6em; line-height: 1.25; color: var(--bx-ink); }
.com-content-article__body h2 { font-size: 1.55rem; padding-bottom: .3rem; border-bottom: 3px solid var(--bx-yellow); display: inline-block; }
.com-content-article__body h3 { font-size: 1.3rem; }
.com-content-article__body h4 { font-size: 1.1rem; }
.com-content-article__body img { max-width: 100%; height: auto; border-radius: 10px; }
.com-content-article__body ul, .com-content-article__body ol { padding-left: 1.3rem; }
.com-content-article__body li { margin-bottom: .35em; }
.com-content-article__body blockquote { border-left: 4px solid var(--bx-red); background: #faf7f2; padding: .8rem 1.1rem; margin: 1.2rem 0; border-radius: 0 8px 8px 0; }
.com-content-article__body table { width: 100%; font-size: .95rem; margin: 1rem 0 1.5rem; }
.com-content-article__body table th { background: var(--bx-ink); color: #fff; }
.com-content-article__body table td, .com-content-article__body table th { padding: .5rem .7rem; border-bottom: 1px solid #eee; }
.bx-video { position: relative; aspect-ratio: 16/9; margin: 1.2rem 0; }
.bx-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
a.bx-file { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; margin: 0 .2rem; border-radius: 6px; background: #fbeaea; color: var(--bx-red-dark); font-size: .9rem; font-weight: 700; text-decoration: none; border: 1px solid #f2c9c9; }
a.bx-file::before { content: "↓"; font-weight: 900; }
a.bx-file:hover { background: var(--bx-red); color: #fff; }
.com-content-article .tags { margin-top: 2rem; }
.com-content-article .tags .btn, .com-content-article .tags a { background: #f1efea; color: #444; border: 0; border-radius: 999px; font-size: .8rem; }

/* ===== Listados de categoría (blog) ===== */
.com-content-category-blog .blog-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.com-content-category-blog .blog-item { display: flex; flex-direction: column; border-top: 4px solid var(--bx-yellow); }
.com-content-category-blog .blog-item .item-image { order: -1; margin: -1.1rem -1.2rem .9rem; }
.com-content-category-blog .blog-item .item-image img { width: 100%; height: 170px; object-fit: cover; border-radius: 11px 11px 0 0; }
.com-content-category-blog .blog-item h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
.com-content-category-blog .blog-item h2 a { color: var(--bx-ink); text-decoration: none; }
.com-content-category-blog .blog-item h2 a:hover { color: var(--bx-red); }
.com-content-category-blog .blog-item .article-info { display: none; }
.com-content-category-blog .blog-item p { font-size: .95rem; color: #444; }
.com-content-category-blog .readmore { margin-top: auto; }
.com-content-category-blog .readmore .btn { background: transparent; border: 0; padding: 0; color: var(--bx-red); font-weight: 700; }
.com-content-category-blog .category-desc { font-size: 1.05rem; color: #444; max-width: 760px; margin-bottom: 1.4rem; }
.com-content-category-blog .com-content-category-blog__children { margin-bottom: 1.5rem; }
.com-content-category-blog .com-content-category-blog__children h3 { font-size: 1.1rem; }

/* Listados: sin etiquetas en las tarjetas */
.com-content-category-blog .blog-item .tags, .blog-featured .tags { display: none; }

/* ===== Reproductor Course Navette ===== */
.bx-navette { background: var(--bx-ink); color: #fff; border-radius: 14px; padding: 1.2rem; margin: 1.5rem 0; }
.bx-nv-screen { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .6rem; }
.bx-nv-screen div { background: #2b2b2e; border-radius: 10px; padding: .6rem .8rem; }
.bx-nv-screen span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #aaa; }
.bx-nv-screen strong { font-size: 1.5rem; color: var(--bx-yellow); font-variant-numeric: tabular-nums; }
.bx-nv-bar { height: 10px; background: #2b2b2e; border-radius: 99px; margin: 1rem 0; overflow: hidden; }
.bx-nv-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--bx-yellow), #F26A1B, var(--bx-red)); transition-property: width; transition-timing-function: linear; }
.bx-nv-controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.bx-nv-controls select { margin-left: .4rem; border-radius: 6px; padding: .3rem; }
.bx-nv-controls button { border: 0; border-radius: 8px; padding: .6rem 1.2rem; font-weight: 800; cursor: pointer; }
.bx-nv-go { background: var(--bx-red); color: #fff; }
.bx-nv-stop { background: #fff; color: var(--bx-ink); }
.bx-nv-controls button:disabled { opacity: .45; cursor: default; }
.bx-nv-help { font-size: .85rem; color: #bbb; margin: .8rem 0 0; }
.bx-note { background: #fff8e1; border-left: 4px solid var(--bx-yellow); padding: .8rem 1rem; border-radius: 0 8px 8px 0; font-size: .95rem; }

/* ===== Cronología de convocatoria ===== */
.bx-timeline { background: #faf9f6; border: 1px solid #ece9e2; border-radius: 14px; padding: 1.2rem 1.4rem; margin: 1rem 0 2rem; }
.bx-timeline h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .05em; color: #666; margin: .4rem 0 .8rem; }
.bx-tl { list-style: none; margin: 0 0 1.2rem; padding: 0 0 0 1.6rem; position: relative; }
.bx-tl::before { content: ""; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; width: 3px; background: #e2ded5; border-radius: 3px; }
.bx-tl li { position: relative; margin: 0 0 .9rem; }
.bx-tl li::before { content: ""; position: absolute; left: -1.38rem; top: .3rem; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #c9c4b8; }
.bx-tl-done li::before { background: #2e9e5b; border-color: #2e9e5b; }
.bx-tl-done::before { background: linear-gradient(#2e9e5b, #2e9e5b); opacity: .35; }
.bx-tl li strong { display: block; font-size: 1rem; line-height: 1.3; }
.bx-tl li p { margin: .15rem 0 0; font-size: .92rem; color: #555; }
.bx-tl li p a { font-weight: 600; white-space: nowrap; }
.bx-tl-date { display: inline-block; font-size: .78rem; font-weight: 800; color: #2e7d4f; background: #e5f4ea; border-radius: 4px; padding: .05rem .45rem; margin-bottom: .2rem; }
.bx-tl-next li { color: #444; }
.bx-tl-next li::before { border-style: dashed; }
.bx-tl-now::before { background: var(--bx-yellow) !important; border-color: var(--bx-yellow) !important; box-shadow: 0 0 0 5px rgba(245,180,0,.25); }
.bx-tl-now .bx-tl-date { color: var(--bx-ink); background: var(--bx-yellow); }
.bx-tl-upd { font-size: .8rem; color: #777; margin: 0; }

/* ===== v2: tarjetas sólidas (con o sin foto), aire y subsecciones ===== */
.com-content-category-blog .blog-item, .blog-featured .blog-item { padding: 0; overflow: hidden; }
.com-content-category-blog .blog-item .item-image { margin: 0; }
.com-content-category-blog .blog-item .item-content, .com-content-category-blog .blog-item > :not(.item-image) { padding-inline: 1.15rem; }
.com-content-category-blog .blog-item .item-content { padding-block: 1rem 1.1rem; display: flex; flex-direction: column; height: 100%; }
.com-content-category-blog .blog-item:not(:has(.item-image))::before {
  content: ""; display: block; height: 96px;
  background: radial-gradient(120% 140% at 100% 0, #F26A1B 0, var(--bx-red) 45%, var(--bx-red-dark) 100%); }
.com-content-category-blog .blog-item:not(:has(.item-image)) { position: relative; }
.com-content-category-blog .blog-item:not(:has(.item-image))::after {
  content: ""; position: absolute; top: 18px; right: 18px; width: 60px; height: 60px; opacity: .35;
  background: url("../images/joomla-favicon.svg") no-repeat center / contain; }
.com-content-category-blog .blog-items { margin-top: .5rem; }
.com-content-category-blog > .category-desc, .com-content-category-blog .page-header { max-width: 820px; }
.com-content-category-blog .page-header h1, .com-content-category-blog h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: .3rem; }

/* Subsecciones de las páginas índice como tarjetas */
.com-content-category-blog__children { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.com-content-category-blog__children > h3, .com-content-category-blog__children > h2 { grid-column: 1 / -1; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .05em; color: #777; margin: 0; }
.com-content-category-blog__child { background: #fff; border: 1px solid #e7e5e0; border-left: 5px solid var(--bx-red); border-radius: 12px; padding: 1rem 1.2rem; }
.com-content-category-blog__child h3, .com-content-category-blog__child .page-header { margin: 0 0 .3rem; font-size: 1.15rem; }
.com-content-category-blog__child a { color: var(--bx-ink); text-decoration: none; }
.com-content-category-blog__child a:hover { color: var(--bx-red); }
.com-content-category-blog__child .category-desc { font-size: .92rem; color: #555; }
.com-content-category-blog__child .badge { background: var(--bx-yellow) !important; color: var(--bx-ink); }

/* Listado tipo tabla (Històric) */
.com-content-category .category { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e7e5e0; }
.com-content-category .category th { background: var(--bx-ink); color: #fff; font-weight: 700; }
.com-content-category .category th a { color: #fff; }
.com-content-category .category td, .com-content-category .category th { padding: .7rem 1rem; }
.com-content-category .category td a { color: var(--bx-ink); text-decoration: none; font-weight: 600; }
.com-content-category .category td a:hover { color: var(--bx-red); }
.com-content-category .category tr:nth-child(even) td { background: #faf9f6; }

/* Aire general: el contenido nunca pegado a los bordes en móvil */
@media (max-width: 767px) {
  .container-component, .container-top-a, .container-top-b, .container-bottom-a { padding-inline: .9rem; }
  .com-content-article { padding: 1.1rem; border-radius: 10px; }
  .bx-hero { border-radius: 12px; }
}
.pagination .page-link { color: var(--bx-ink); }
.pagination .active .page-link { background: var(--bx-red); border-color: var(--bx-red); color: #fff; }
.com-content-category .category tbody th { background: transparent; color: inherit; font-weight: 600; }
.com-content-category .category tbody th a { color: var(--bx-ink); text-decoration: none; }
.com-content-category .category tbody th a:hover { color: var(--bx-red); }
.com-content-category .category tbody tr:nth-child(even) th { background: #faf9f6; }
.com-content-category__filter, .com-content-category .filters { margin: .8rem 0 1rem; }
.com-content-category-blog__child .badge, .com-content-category-blog__children > h3 { display: none; }

/* ===== Foro (Kunena 7, plantilla aurelia) integrado con la web ===== */
#kunena { font-size: 1rem; }
#kunena .mod-kunena-breadcrumbs, #kunena #jumpto, #kunena .kfrontend > h2.btn-toolbar,
#kunena a[href*="feed.feed"], #kunena #kwho, #kunena #kwho + *, #kunena .kfrontend:has(#kwho) { display: none !important; }
#kunena > nav.navbar { background: #fff !important; box-shadow: none !important; border: 1px solid #e7e5e0 !important;
  border-radius: 12px !important; padding: .35rem .8rem; margin-bottom: 1.2rem; }
#kunena > nav.navbar .nav-link { font-weight: 700; color: var(--bx-ink); border-radius: 8px; padding: .45rem .9rem; }
#kunena > nav.navbar .nav-link.active, #kunena > nav.navbar .nav-link:hover { background: #fbeaea; color: var(--bx-red); }
#kunena > nav.navbar .btn-light { background: var(--bx-red); color: #fff; border: 0; font-weight: 700; border-radius: 8px; }
#kunena .kfrontend { box-shadow: none !important; border: 1px solid #e7e5e0 !important; border-radius: 14px !important;
  overflow: hidden; background: #fff; margin-bottom: 1.4rem; }
#kunena .kfrontend > .card-header, #kunena .kfrontend > h1.card-header, #kunena .kfrontend > h2.card-header {
  background: var(--bx-ink); color: #fff; margin: 0; padding: .85rem 1.2rem; font-size: 1.05rem; border: 0;
  letter-spacing: .04em; text-transform: uppercase; }
#kunena .kfrontend > .card-header a { color: #fff; text-decoration: none; }
#kunena .kfrontend > .card-header small { color: var(--bx-yellow); font-weight: 700; margin-left: .5rem; text-transform: none; letter-spacing: 0; }
#kunena .collapse, #kunena .shadow-lg { box-shadow: none !important; }
#kunena table.table { margin: 0; }
#kunena table.table > tbody > tr:first-child > td { background: #faf9f6; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #888; }
#kunena tr.category > td { padding: .85rem 1rem; vertical-align: middle; border-top: 1px solid #f0eee9; }
#kunena tr.category:hover > td { background: #fdf8f4; }
#kunena tr.category #kcat-icon svg { font-size: 1.7rem; color: var(--bx-red); }
#kunena tr.category h3 { font-size: 1.12rem; margin: 0 0 .15rem; }
#kunena tr.category h3 a { color: var(--bx-ink); text-decoration: none; }
#kunena tr.category h3 a:hover { color: var(--bx-red); }
#kunena #kcatcount { background: #f1efea; border-radius: 999px; padding: .1rem .55rem; font-size: .72rem; color: #555; font-weight: 700; margin-left: .3rem; }
#kunena tr.category .kcat-desc, #kunena tr.category p { color: #666; font-size: .9rem; margin: 0; }
#kunena tr.category a[href*="/forum/"] small, #kunena .text-muted { color: #777 !important; }
#kunena .kfrontend .card-body { padding: 1rem 1.2rem; }
#kunena .btn-primary, #kunena .btn-outline-primary { background: var(--bx-red); border-color: var(--bx-red); color: #fff; }
#kunena .pagination .page-link { color: var(--bx-ink); }
#kunena .pagination .active .page-link { background: var(--bx-red); border-color: var(--bx-red); color: #fff; }
/* Temas y mensajes */
#kunena .kmessage, #kunena .kmsg, #kunena .topic-item-messages { border-radius: 12px; }
#kunena .kmessage-left, #kunena .profile-left { background: #faf9f6; border-radius: 12px; }
#kunena .kmsgbody, #kunena .kmsgtext { font-size: 1rem; line-height: 1.65; }
#kunena .badge.bg-info, #kunena .badge.bg-primary { background: var(--bx-ink) !important; }
/* Cabecera del foro */
.bx-forum-hero { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  background: var(--bx-ink); color: #fff; border-radius: 14px; padding: 1.2rem 1.5rem; margin-bottom: 1.2rem; box-shadow: inset 0 -4px 0 var(--bx-red); }
.bx-forum-hero h2 { color: #fff; margin: 0 0 .2rem; font-size: 1.6rem; }
.bx-forum-hero p { margin: 0; color: #cfcfcf; }
.bx-forum-hero .bx-forum-cta { display: flex; gap: .5rem; flex-wrap: wrap; }
.bx-forum-hero a { padding: .6rem 1rem; border-radius: 8px; font-weight: 700; text-decoration: none; }
.bx-forum-hero a.bx-main { background: var(--bx-red); color: #fff; }
.bx-forum-hero a.bx-ghost { border: 2px solid rgba(255,255,255,.5); color: #fff; }

/* ===== Motor de tests ===== */
.bx-tests { margin: 1.2rem 0 2rem; }
.bx-t-loading { color: #777; }
.bx-t-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-bottom: 1.2rem; }
.bx-t-stats div { background: var(--bx-ink); color: #fff; border-radius: 12px; padding: .8rem 1rem; }
.bx-t-stats strong { display: block; font-size: 1.6rem; color: var(--bx-yellow); line-height: 1.1; }
.bx-t-stats span { font-size: .78rem; color: #bbb; text-transform: uppercase; letter-spacing: .05em; }
.bx-t-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.bx-t-mode { background: #fff; border: 1px solid #e7e5e0; border-top: 4px solid var(--bx-yellow); border-radius: 12px; padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.bx-t-mode.bx-t-main { border-top-color: var(--bx-red); grid-column: 1 / -1; background: linear-gradient(135deg, #fff 60%, #fbeaea); }
.bx-t-mode.bx-t-err { border-top-color: #2e9e5b; }
.bx-t-mode h3 { margin: 0; font-size: 1.15rem; }
.bx-t-mode p { margin: 0; color: #555; font-size: .95rem; }
.bx-t-mode select { width: 100%; padding: .5rem; border-radius: 8px; border: 1px solid #ccc; font-size: .92rem; background: #fff; }
.bx-tests button { border: 0; border-radius: 10px; padding: .75rem 1.2rem; font-weight: 800; cursor: pointer; background: var(--bx-red); color: #fff; font-size: 1rem; }
.bx-tests button:hover { background: var(--bx-red-dark); }
.bx-tests button:disabled { opacity: .4; cursor: default; }
.bx-tests .bx-t-link { background: transparent; color: var(--bx-ink); border: 2px solid #ddd; }
.bx-tests .bx-t-link:hover { background: #f4f2ee; }
.bx-t-mode button { margin-top: auto; align-self: flex-start; }
.bx-t-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; color: #666; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.bx-t-clock { background: var(--bx-ink); color: var(--bx-yellow); padding: .2rem .6rem; border-radius: 6px; font-variant-numeric: tabular-nums; }
.bx-t-bar { height: 8px; background: #ece9e2; border-radius: 99px; margin: .6rem 0 1rem; overflow: hidden; }
.bx-t-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--bx-yellow), var(--bx-red)); transition: width .3s; }
.bx-t-num { margin: 0; color: #888; font-size: .85rem; }
.bx-t-q { font-size: clamp(1.1rem, 2.4vw, 1.35rem); line-height: 1.4; margin: .3rem 0 1rem; }
.bx-t-opts { display: grid; gap: .55rem; }
.bx-tests .bx-t-opt { text-align: left; background: #fff; color: var(--bx-ink); border: 2px solid #e2ded5; font-weight: 500; line-height: 1.4; padding: .8rem 1rem; }
.bx-tests .bx-t-opt:hover { background: #fdf8f4; border-color: var(--bx-yellow); }
.bx-tests .bx-t-opt b { color: var(--bx-red); margin-right: .3rem; }
.bx-tests .bx-t-opt.ok { background: #e5f4ea; border-color: #2e9e5b; }
.bx-tests .bx-t-opt.ko { background: #fbeaea; border-color: var(--bx-red); }
.bx-tests .bx-t-opt.sel { background: #fff8e1; border-color: var(--bx-yellow); }
.bx-t-fb { margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 10px; }
.bx-t-fb.ok { background: #e5f4ea; color: #1d6b3e; }
.bx-t-fb.ko { background: #fbeaea; color: var(--bx-red-dark); }
.bx-t-fb p { margin: .4rem 0 0; color: #333; }
.bx-t-src { font-size: .78rem; color: #999; margin: .8rem 0 0; }
.bx-t-nav { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; margin-top: 1rem; }
.bx-t-quit, .bx-t-reset { text-align: center; margin-top: 1rem; }
.bx-t-quit .bx-t-link, .bx-t-reset .bx-t-link { border: 0; font-weight: 600; font-size: .85rem; color: #888; }
.bx-t-result { border-radius: 14px; padding: 1.4rem; text-align: center; }
.bx-t-result.ok { background: #e5f4ea; } .bx-t-result.ko { background: #fbeaea; }
.bx-t-big { font-size: 3rem; font-weight: 900; margin: 0; line-height: 1; } .bx-t-big small { font-size: 1.2rem; color: #666; }
.bx-t-revtitle { margin-top: 1.6rem; }
.bx-t-rev { padding-left: 1.2rem; } .bx-t-rev li { margin-bottom: .9rem; padding-left: .3rem; }
.bx-t-rev li p { margin: .1rem 0; } .bx-t-rev li.ko { border-left: 3px solid var(--bx-red); } .bx-t-rev li.ok { border-left: 3px solid #2e9e5b; } .bx-t-rev li.bl { border-left: 3px solid #bbb; }
.bx-t-exp { font-size: .9rem; color: #555; }
/* Página d'examen amb solucions (SEO) */
.bx-exam-list { padding-left: 1.4rem; } .bx-exam-list li { margin-bottom: 1.1rem; } .bx-exam-list ol { list-style: lower-alpha; margin: .3rem 0; }
.bx-exam-list .bx-right { font-weight: 700; color: #1d6b3e; }

/* Tests: compte i registre (29-nov-2026) */
.bx-tests .bx-t-acc { margin: 0 0 1rem; font-size: .95rem; }
.bx-tests .bx-t-anon { background: #fff8e1; border: 1px solid #f5d77a; border-left: 5px solid var(--bx-yellow); border-radius: 10px; padding: .9rem 1.1rem; }
.bx-tests .bx-t-anon p { margin: .2rem 0; }
.bx-tests a.bx-t-btn { display: inline-block; background: var(--bx-red); color: #fff; font-weight: 700; text-decoration: none;
  padding: .6rem 1.2rem; border-radius: 999px; margin: .4rem .6rem .2rem 0; }
.bx-tests a.bx-t-btn:hover { background: var(--bx-red-dark); color: #fff; }
.bx-tests .bx-t-gate { background: #fff; border-radius: 14px; padding: 1.6rem 1.6rem 1.2rem; text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); border-top: 5px solid var(--bx-red); }
.bx-tests .bx-t-gate h3 { font-size: 1.5rem; margin: .2rem 0 .8rem; }
.bx-tests .bx-t-gate-k { color: var(--bx-red); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; margin: 0; }
.bx-tests .bx-t-gate ul { text-align: left; max-width: 30rem; margin: 0 auto 1rem; padding-left: 1.2rem; }
.bx-tests .bx-t-gate li { margin: .3rem 0; }

/* Portada: estat actual i proper pas de la 81/26 (29-nov-2026) */
.bx-hero .bx-hero-status { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr auto; gap: .7rem;
  margin-top: 1.4rem; }
.bx-hero .bx-hs { background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: .7rem .9rem; color: #fff; }
.bx-hero .bx-hs span { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--bx-yellow); }
.bx-hero .bx-hs strong { display: block; font-size: 1rem; line-height: 1.25; margin: .15rem 0; }
.bx-hero .bx-hs em { display: block; font-style: normal; font-size: .85rem; color: #ffe1dc; line-height: 1.3; }
.bx-hero .bx-hs-now span::before { content: "● "; color: #7CFC9A; }
.bx-hero .bx-hs-link { align-self: center; color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; padding: .4rem .2rem; }
.bx-hero .bx-hs-link small { display: block; font-weight: 400; font-size: .75rem; color: #ffd5cf; }
.bx-hero .bx-hs-link:hover { color: var(--bx-yellow); }
@media (max-width: 767px) {
  .bx-hero .bx-hero-status { grid-template-columns: 1fr; }
  .bx-hero .bx-hs-link { white-space: normal; }
}

/* Menú: hamburguesa en mòbil (layout collapse-metismenu) */
.container-header .navbar-toggler { color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; padding: .35rem .7rem; font-size: 1.3rem; }
.container-header .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(245,180,0,.5); }
@media (max-width: 991.98px) {
  .container-header .container-nav { padding-block: 0 .5rem; }
  .container-header .navbar-collapse .metismenu { flex-direction: column; align-items: stretch; padding: .4rem 0; }
  .container-header .navbar-collapse .metismenu > li { border-top: 1px solid rgba(255,255,255,.12); }
  .container-header .navbar-collapse .metismenu > li > a, .container-header .navbar-collapse .metismenu > li > button { padding: .7rem .2rem; }
  .container-header .navbar-collapse .metismenu .mm-collapse { position: static; box-shadow: none; border-radius: 6px; margin-bottom: .4rem; }
}
/* Mòbil: l'estat de la convocatòria just sota el titular */
@media (max-width: 767px) {
  .bx-hero { display: flex; flex-direction: column; }
  .bx-hero .bx-kicker { order: 0; align-self: flex-start; }
  .bx-hero h2 { order: 1; }
  .bx-hero .bx-hero-status { order: 2; margin-top: .6rem; gap: .5rem; }
  .bx-hero > p { order: 3; font-size: 1rem; margin-top: .9rem; }
  .bx-hero .bx-actions { order: 4; }
  .bx-hero .bx-hs { padding: .55rem .75rem; }
  .bx-hero .bx-hs em { font-size: .8rem; }
}

/* Portada: Ara al fòrum (29-nov-2026) */
.bx-forum-latest { background: #fff; border-radius: 14px; padding: 1.1rem 1.3rem .9rem; margin: 1.6rem 0 1.4rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); border-left: 5px solid var(--bx-red); }
.bx-forum-latest .bx-fl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.bx-forum-latest .bx-fl-head .bx-section-title { margin: 0 0 .4rem; }
.bx-forum-latest .bx-fl-head a { font-weight: 700; text-decoration: none; }
.bx-forum-latest ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.6rem; }
.bx-forum-latest li { border-top: 1px solid #eee; }
.bx-forum-latest li a { display: block; padding: .6rem 0; text-decoration: none; color: var(--bx-ink); }
.bx-forum-latest li a:hover strong { color: var(--bx-red); }
.bx-forum-latest li strong { display: block; font-size: .98rem; line-height: 1.3; }
.bx-forum-latest li span { display: block; font-size: .8rem; color: #6b6b6b; margin-top: .15rem; }
.bx-forum-latest .bx-fl-load { color: #888; padding: .6rem 0; }
.bx-forum-latest .bx-fl-cta { margin: .7rem 0 0; font-size: .92rem; }
@media (max-width: 767px) { .bx-forum-latest ul { grid-template-columns: 1fr; } }

/* Portada: Generalitat + Barcelona (29-nov-2026). Classe a tools/diseno.py (DUO) */
.bx-duo { display: grid; gap: 1rem; align-items: stretch; }
.bx-duo.bx-duo-gene { grid-template-columns: 2fr 1fr; }
.bx-duo.bx-duo-eq   { grid-template-columns: 1fr 1fr; }
.bx-duo.bx-duo-bcn  { grid-template-columns: 1fr 2fr; }
.bx-duo > .bx-hero { margin: 0; }
.bx-duo .bx-hero-bcn { background: linear-gradient(160deg, #2b2b2e 0%, #1d1d1f 100%); display: flex; flex-direction: column; }
.bx-duo .bx-hero-bcn::after { opacity: .35; }
.bx-duo .bx-hero-bcn .bx-kicker { background: #e7e5e0; }
.bx-duo .bx-hero-bcn h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.bx-duo .bx-hero-bcn .bx-hero-status { grid-template-columns: 1fr; margin-top: .8rem; }
.bx-duo .bx-hero-bcn .bx-hs { background: rgba(255,255,255,.06); }
.bx-duo .bx-hero-bcn .bx-hs-now span::before { content: "● "; color: #9a9a9a; }
.bx-duo .bx-hero-bcn .bx-actions { margin-top: auto; padding-top: 1rem; }
/* Al 2/3 la caixa d'estat de la Generalitat va en dues files */
@media (min-width: 992px) {
  .bx-duo-gene > .bx-hero:first-child .bx-hero-status { grid-template-columns: 1fr 1fr; }
  .bx-duo-gene > .bx-hero:first-child .bx-hs-link { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 991.98px) {
  .bx-duo.bx-duo-gene, .bx-duo.bx-duo-eq, .bx-duo.bx-duo-bcn { grid-template-columns: 1fr; }
}
