/**
 * Base del tema BComú
 *
 * Sustituye al CSS de Astra, que fue el tema padre hasta noviembre de 2026.
 * 1. Reset y valores por defecto: los mismos que aplicaba Astra a los elementos
 *    sueltos (html, títulos, párrafos, listas, formularios, botones), para que
 *    lo hecho con Elementor se vea igual. Lo que Astra pintaba con su paleta
 *    va ya con los colores de la marca.
 * 2. Envoltorios de la página.
 * 3. Plantillas propias: fichas (agenda, executiva), listados (búsqueda,
 *    categorías de la agenda) y 404.
 */

/* ==== 1. Reset y valores por defecto ================================= */

html {
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

address, blockquote, body, dd, dl, dt, fieldset, figure, h1, h2, h3, h4, h5, h6,
hr, html, iframe, legend, li, ol, p, pre, textarea, ul {
  border: 0;
  font-size: 100%;
  font-style: inherit;
  font-weight: inherit;
  margin: 0;
  outline: 0;
  padding: 0;
  vertical-align: baseline;
}

/* 1rem = 20 px en escritorio y 18,24 px por debajo de 922 px. Los tamaños en
   rem de Elementor y del tema cuentan con ello. */
html { font-size: 125%; }
@media (max-width: 921px) {
  html { font-size: 114%; }
}

body,
button,
input,
select,
textarea {
  font-family: 'EB Garamond', serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.3;
}

body {
  margin: 0;
  color: #10090C;
  background-color: #FFFFFF;
  font-style: normal;
  overflow-x: clip; /* hidden rompería position: sticky */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Bloqueo de scroll de popups (carrusel del grupo municipal, agenda…):
   ponen overflow: hidden en body, pero con html en overflow-x: clip el
   bloqueo tiene que estar en html para llegar a la ventana. */
html:has(> body[style*="overflow: hidden"]) {
  overflow: hidden;
}

/* Las anclas (#grup-municipal…) bajan con suavidad */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

::selection {
  background-color: #CE0037;
  color: #FFFFFF;
}

h1, h2, h3, h4, h5, h6 {
  clear: both;
  color: #10090C;
  font-weight: 600;
}
h1 { font-size: 1.8rem; line-height: 1.4em; }
h2 { font-size: 1.5rem; line-height: 1.3em; }
h3 { font-size: 1.2rem; line-height: 1.3em; }
h4 { font-size: 1rem; line-height: 1.2em; }
h5 { font-size: .9rem; line-height: 1.2em; }
h6 { font-size: .8rem; line-height: 1.25em; }
@media (max-width: 921px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1rem; }
}

p { margin-bottom: 1.75em; }

a {
  color: #CE0037;
  background-color: transparent;
  text-decoration: none;
  transition: all .2s linear;
}

ol,
ul { margin: 0 0 1.5em 3em; }
ul { list-style: disc; }
ol { list-style: decimal; }
li > ol,
li > ul { margin-bottom: 0; margin-left: 1.5em; }
dd { margin: 0 1.5em 1em; }

blockquote {
  quotes: "" "";
  position: relative;
  margin: 1.5em;
  padding: 20px;
  border-left: 5px solid rgb(0 0 0 / .05);
  color: #10090C;
  font-size: 1.1em;
  font-style: italic;
}

img {
  border: 0;
  height: auto;
  max-width: 100%;
  vertical-align: middle;
}
figure { margin: 0; }
embed,
iframe,
object { max-width: 100%; }

hr {
  box-sizing: content-box;
  height: 1px;
  margin-bottom: 1.5em;
  border: 0;
  background-color: #CCCCCC;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin: 0 0 1.5em;
}
table,
td,
th { border: 1px solid #D1D5DB; }
table { border-width: 1px 0 0 1px; }
td,
th { padding: .7em 1em; border-width: 0 1px 1px 0; }
th { font-weight: 600; }

b, strong { font-weight: 700; }
cite, dfn, em, i { font-style: italic; }
/* Cursiva dentro de las noticias y de las páginas del tema: Raveo no tiene
   cursiva y el navegador la inclinaba a la fuerza. Va en Inter cursiva, como
   pide el manual (3B, 9/11/2026). Las citas quedan con su letra, y los <i>
   con clase (iconos) no se tocan */
:is(.elementor-widget-theme-post-content, .entry-content) :is(em, i):not(blockquote *, [class]) {
  font-family: "Inter", "Raveo", sans-serif;
  font-size: .95em;
  letter-spacing: -.01em;
}
address { margin: 0 0 1.5em; font-style: italic; }
abbr[title], abbr, acronym { border-bottom: 1px dotted #666666; cursor: help; }
mark, ins { background: transparent; text-decoration: none; }
small { font-size: 80%; }
big { font-size: 125%; }
sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; }
sup { top: -.5em; }
sub { bottom: -.25em; }
blockquote::before, blockquote::after, q::before, q::after { content: ""; }
pre {
  max-width: 100%;
  margin-bottom: 1.6em;
  padding: 1.6em;
  overflow: auto;
  background: #F5F5F5;
  font-family: "Courier 10 Pitch", Courier, monospace;
}
code, kbd, tt, var { font: 1em Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; }
dt { font-weight: 600; }
fieldset { margin: 0; padding: 30px; border: 1px solid #D1D5DB; border-radius: 4px; }
fieldset legend { margin-bottom: 1.5em; padding: 0 .5em; }
label,
legend {
  color: #10090C;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
}
legend { border: 0; padding: 0; }

/* Alineaciones y pies de foto del editor de WordPress */
.alignleft { display: inline; float: left; margin-right: 1.5em; }
.alignright { display: inline; float: right; margin-left: 1.5em; }
.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; text-align: center; }
.wp-caption { margin-bottom: 1.5em; max-width: 100%; }
.wp-caption img[class*="wp-image-"] { display: block; margin-left: auto; margin-right: auto; }
.wp-caption .wp-caption-text { margin: .8075em 0; }
.wp-caption-text { text-align: center; }

/* Contenido de páginas y entradas */
.entry-content { overflow-wrap: break-word; }
.entry-content :where(h1, h2, h3, h4, h5, h6) { clear: none; margin-bottom: 20px; }
.entry-content p { margin-bottom: 1.6em; }
.entry-content ul,
.entry-content ol { margin: revert; padding: revert; padding-left: 20px; }
.entry-content > :last-child { margin-bottom: 0; }

/* Formularios */
button,
input,
optgroup,
select,
textarea {
  margin: 0;
  color: inherit;
  vertical-align: baseline;
  text-transform: none;
}
input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="reset"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
  color: #475569;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
}
/* Sin el aspecto del sistema solo en los campos de texto: los desplegables
   y las fechas conservan su flecha y su calendario */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
textarea {
  -webkit-appearance: none;
  appearance: none;
}
input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="reset"],
input[type="tel"],
input[type="date"],
select { height: 40px; }
select { padding: 6px 10px; }
textarea { overflow: auto; }
input:focus,
select:focus,
textarea:focus {
  border-color: #10090C;
  outline: none;
  box-shadow: none;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #10090C;
  outline-offset: 1px;
}
::placeholder { color: #9CA3AF; }

button,
.button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
  padding: 15px 30px;
  border: 0 solid #CE0037;
  border-radius: 4px;
  background-color: #CE0037;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
  color: #FFFFFF;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1em;
}
@media (max-width: 921px) {
  button, .button, input[type="button"], input[type="reset"], input[type="submit"] { padding: 14px 28px; }
}
@media (max-width: 544px) {
  button, .button, input[type="button"], input[type="reset"], input[type="submit"] { padding: 12px 24px; }
}
button:hover,
button:focus-visible,
.button:hover,
.button:focus-visible,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
  background-color: #6248CB;
  border-color: #6248CB;
  color: #FFFFFF;
}

/* Elementor: lo que Astra añadía a sus widgets */
.elementor-widget-heading .elementor-heading-title { margin: 0; }
.elementor-widget-heading h1.elementor-heading-title { line-height: 1.4em; }
.elementor-widget-heading h2.elementor-heading-title { line-height: 1.3em; }
.elementor-widget-heading h3.elementor-heading-title { line-height: 1.3em; }
.elementor-widget-heading h4.elementor-heading-title { line-height: 1.2em; }
.elementor-widget-heading h5.elementor-heading-title { line-height: 1.2em; }
.elementor-widget-heading h6.elementor-heading-title { line-height: 1.25em; }

/* Enlaces subrayados dentro del contenido de páginas y entradas, menos los botones */
:is(.single, .page) .entry-content a { text-decoration: underline; }
:is(.single, .page) .elementor-widget-button .elementor-button { text-decoration: none; }
/* Ni los menús de Elementor dentro de la página (subnavegación de transparencia)
   ni los contenedores que son un enlace entero (tarjetas de la portada de transparencia) */
:is(.single, .page) .elementor-nav-menu a,
:is(.single, .page) a.e-con { text-decoration: none; }

/* Botón de Elementor sin estilo propio: rojo, como lo dejaba Astra */
.elementor-widget-button .elementor-button {
  border-style: solid;
  border-width: 0;
  border-color: #CE0037;
  background-color: #CE0037;
  color: #FFFFFF;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1em;
  text-decoration: none;
}
.elementor-button.elementor-size-xs,
.elementor-button.elementor-size-sm,
.elementor-button.elementor-size-md,
.elementor-button.elementor-size-lg,
.elementor-button.elementor-size-xl,
.elementor-button { padding: 15px 30px; }
body .elementor-button.elementor-size-xs,
body .elementor-button.elementor-size-sm,
body .elementor-button.elementor-size-md,
body .elementor-button.elementor-size-lg,
body .elementor-button.elementor-size-xl,
body .elementor-button { font-size: .8rem; }
@media (max-width: 921px) {
  .elementor-widget-button .elementor-button.elementor-size-xs,
  .elementor-widget-button .elementor-button.elementor-size-sm,
  .elementor-widget-button .elementor-button.elementor-size-md,
  .elementor-widget-button .elementor-button.elementor-size-lg,
  .elementor-widget-button .elementor-button.elementor-size-xl,
  .elementor-widget-button .elementor-button { padding: 14px 28px; }
}
@media (max-width: 544px) {
  .elementor-widget-button .elementor-button.elementor-size-xs,
  .elementor-widget-button .elementor-button.elementor-size-sm,
  .elementor-widget-button .elementor-button.elementor-size-md,
  .elementor-widget-button .elementor-button.elementor-size-lg,
  .elementor-widget-button .elementor-button.elementor-size-xl,
  .elementor-widget-button .elementor-button { padding: 12px 24px; }
}

/* Contenido de la noticia dentro de la plantilla de Elementor */
.content-area .elementor-widget-theme-post-content :is(h1, h2, h3, h4, h5, h6) {
  margin-top: 1.5em;
  margin-bottom: calc(.3em + 10px);
}

.elementor-widget-container .elementor-loop-container .e-loop-item[data-elementor-type="loop-item"] { width: 100%; }
.elementor-loop-container .e-loop-item { padding: 0; }
.elementor-post.elementor-grid-item.hentry { margin-bottom: 0; }
.elementor-toc__list-wrapper { margin: 0; }
body .elementor hr { margin: 0; background-color: #CCCCCC; }
.elementor-screen-only,
.screen-reader-text,
.screen-reader-text span,
.ui-helper-hidden-accessible { top: 0 !important; }

/* Contact Form 7 (lo que añadía Astra) */
.wpcf7 form { position: relative; }
.wpcf7 form > div,
.wpcf7 form > p { margin-bottom: 1.2em; }
.wpcf7 .wpcf7-form-control-wrap { display: block; width: 100%; }
.wpcf7 input:not([type="submit"]),
.wpcf7 select,
.wpcf7 textarea { width: 100%; padding: .75em; }
.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] {
  display: inline-block;
  width: 1.4em;
  min-width: 1.4em;
  height: 1.2em;
  margin: -3px 4px 0 0;
  padding: 0;
  border-radius: .2em;
  background: #E9EEF2;
  color: #555555;
  line-height: 0;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  -webkit-appearance: auto;
  appearance: auto;
}

/* Accesibilidad */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  top: 8px;
  left: 8px;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 12px 18px;
  clip-path: none;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 6px 18px rgb(16 9 12 / .18);
  color: #10090C;
  font-family: 'Raveo', sans-serif;
  font-size: 16px;
  line-height: 1.2;
}

/* ==== 2. Envoltorios de la página ================================== */

/* Fondo blanco en #page: .site-content lo hereda (css/footer-reveal.css) y
   tapa el footer fijo de debajo, que solo asoma por el hueco del final. */
#page { background-color: #FFFFFF; }

/* La ficha de la candidatura (plantilla de Elementor del grup municipal) salía
   con Astra en una caja de 1240 px; el grup municipal, a todo el ancho */
.single-candidatura #primary {
  max-width: 1240px;
  margin: 0 auto;
  padding: 60px 20px 90px;
}

.bec-capcalera-reserva { padding: 24px; }
.bec-capcalera-reserva img { width: 200px; }
.bec-peu-reserva { padding: 48px 24px; font-family: 'Raveo', sans-serif; font-size: .8rem; }

/* ==== 3. Plantillas propias ======================================== */

.bec-fitxa,
.bec-llistat {
  --bec-marge-sup: 168px;
  margin: 0 auto;
  padding: var(--bec-marge-sup) 24px 96px;
  /* Que llenen la pantalla: si no, en una ficha corta el footer que se
     descubre asoma a media altura nada más cargar */
  min-height: 100vh;
  min-height: 100svh;
}
.bec-fitxa { max-width: calc(720px + 48px); }
.bec-llistat { max-width: calc(1240px + 48px); }
@media (max-width: 767px) {
  .bec-fitxa,
  .bec-llistat { --bec-marge-sup: 160px; padding-inline: 20px; padding-bottom: 72px; } /* la cabecera móvil, con los dos botones, mide 125 px */
}

.bec-fitxa__avantitol {
  margin: 0 0 14px;
  color: #CE0037;
  font-family: 'Raveo Display', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.bec-fitxa__titol,
.bec-llistat__titol {
  margin: 0 0 24px;
  color: #10090C;
  font-family: 'Raveo Display', sans-serif;
  font-size: clamp(34px, 2.4vw + 22px, 56px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.bec-fitxa__dades {
  display: grid;
  gap: 6px;
  margin: 0 0 32px;
  color: #10090C;
  font-family: 'Raveo', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.bec-fitxa__dades > div { display: flex; gap: 12px; }
.bec-fitxa__dades dt { min-width: 3.5em; font-weight: 600; }
.bec-fitxa__dades dd { margin: 0; }

.bec-fitxa__accio { margin: -8px 0 32px; }

.bec-fitxa__imatge { margin: 0 0 40px; }
.bec-fitxa__imatge img {
  display: block;
  width: 100%;
  border-radius: 20px;
}
.bec-fitxa__imatge--retrat img {
  max-width: 360px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.bec-fitxa__cos {
  font-family: 'EB Garamond', serif;
  font-size: 20px;
  line-height: 1.45;
}
@media (max-width: 767px) {
  .bec-fitxa__cos { font-size: 18px; }
}
.bec-fitxa__cos a {
  color: #10090C;
  text-decoration: underline;
  text-decoration-color: #CE0037;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
/* Cita de la persona: tipográfica, en cursiva y más grande, con la comilla
   de apertura en rojo; sin filete lateral */
.bec-fitxa__cita {
  margin: 0 0 1.6em;
  padding: 0;
  border: 0;
  font-size: 1.3em;
  line-height: 1.3;
}
.bec-fitxa__cita p { margin: 0; }
.bec-fitxa__cita p::before {
  content: "«";
  color: #CE0037;
}
.bec-fitxa__cita p::after { content: "»"; }

.bec-fitxa__tornar {
  margin: 48px 0 0;
  font-family: 'Raveo', sans-serif;
  font-size: 16px;
}
.bec-fitxa__tornar a,
.bec-fitxa__tornar a:visited { color: #10090C; }
.bec-fitxa__tornar a:hover { color: #CE0037; }

.bec-boto,
.bec-boto:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 20px;
  background-color: #CE0037;
  color: #FFFFFF;
  font-family: 'Raveo Display', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}
.bec-boto:hover { box-shadow: inset 0 0 0 100vmax rgb(16 9 12 / .14); color: #FFFFFF; }

/* Listados */
.bec-llistat__cap { max-width: 720px; margin-bottom: 56px; }
.bec-llistat__buit {
  margin: 0 0 24px;
  font-family: 'Raveo', sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

.bec-llistat .search-form {
  display: flex;
  gap: 8px;
  max-width: 520px;
}
.bec-llistat .search-form label { flex: 1; }
.bec-llistat .search-field { height: 44px; border-radius: 20px; padding-inline: 18px; }
.bec-llistat .search-submit {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 20px;
  font-family: 'Raveo Display', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
}

.bec-llistat__graella {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 48px 24px;
}
.bec-targeta { margin: 0; }
.bec-targeta__enllac,
.bec-targeta__enllac:visited {
  display: block;
  color: #10090C;
}
.bec-targeta__imatge {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin-bottom: 16px;
  border-radius: 20px;
  object-fit: cover;
}
.bec-targeta__data {
  display: block;
  margin-bottom: 8px;
  color: #CE0037;
  font-family: 'Raveo', sans-serif;
  font-size: 14px;
  line-height: 1.2;
}
.bec-targeta__titol {
  margin: 0 0 10px;
  color: #10090C;
  font-family: 'Raveo Display', sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.bec-targeta__enllac:hover .bec-targeta__titol { text-decoration-line: underline; }
.bec-targeta__resum {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.bec-llistat .navigation.pagination { margin-top: 64px; }
.bec-llistat .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: 'Raveo', sans-serif;
  font-size: 16px;
}
.bec-llistat .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 20px;
  color: #10090C;
}
.bec-llistat a.page-numbers:hover { background-color: #F5F5F5; }
.bec-llistat .page-numbers.current { background-color: #10090C; color: #FFFFFF; }
