.container {
    max-width: 1170px !important; /* Maximo para pantallas grandes */
}

.main-header{
  background: none !important;
}

html {
  font-size: 16px !important;
}

html body {
  font-size: 1rem;
  line-height: 1.6;
}

/* body a { color: #253B5F !important } */

body h1, body .h1{ font-size: 2rem !important; font-weight: 700 !important; color: #253B5F !important; } /* 32px */

body h2, body .h2{ font-size: 1.5rem; font-weight: 600 !important; color: #000 !important; } /* 24px */

body h3, body .h3{ font-size: 1.25rem; font-weight: 600 !important; color: #000 !important; } /* 20px */

body h4, body .h4{ font-size: 1.125rem; color: #000 !important; } /* 18px */

body h2 a, body h2 a:hover { color: #253B5F !important;}

img{ max-width: 100%; height: auto; }

#main-menu {
  font-size: 0.9rem;
}

/* Add margin in content general and fields */
.node__content {
  margin-top: 2em;
  margin-bottom: 4em;
}

.node__content img {
  margin-bottom: 1.5em;
}

.node__content .field-tags {
  margin-bottom: 1em;
}


table,
table td,
table th {
  border: none !important;
}

img.align-left {
  float: left;
  margin-right: 1em;
  margin-bottom: 1em;
}

img.align-right {
  float: right;
  margin-left: 1em;
  margin-bottom: 1em;
}

img.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Ocultar social media + search block */
@media (max-width: 767.98px) {
  .social-search-wrapper {
    display: none !important;
  }
}

/* Estilos para search block */
.social-search-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* uno arriba, otro abajo */
  align-items: flex-end;          /* alinea al borde derecho */
  height: 100%;
}

.search-block {
  max-width: 250px;
  width: 100%;
  text-align: right;
}

.block-search {
  margin: 0 !important;
}

#search-block-form input {
  margin-top: 10px;
  padding: 4px 0 !important;
}

#search-block-form .form-item{
  padding-right: 2px !important;
}

/* Estilos para social block */
@media (min-width: 767px) {
  .social-media a {
      margin: 0px 0 0 5px !important;
  }
}

/* New use svg and center */
.social-media a {
  width: 30px;
  height: 30px;
  color: #fff;
  float: left;
  text-align: center;
  background: #3262b9;
  font-size: 14px;
  display: flex;              /* Añadido */
  align-items: center;        /* Centrado vertical */
  justify-content: center;    /* Centrado horizontal */
  border-radius: 50px;
}

/* Estilos para social instagram */
.social-media a.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Estilos para social twitter, ahora X */
.social-media a.twitter {
  background: #000000 !important;
}

/* Forze show in all devices*/ 
.slideshow{
    display: block !important;
}

@media (max-width: 768px) {

  .carousel-indicators {
    display: none !important;
  }

  .carousel-caption {
    left: 5% !important ;
    right: 5% !important;
    bottom: 0px !important;
    padding-bottom: 0 !important;
  }

  .carousel-caption h3 {
    font-size: 0.9em;
    color: #fff !important;
    text-transform: uppercase;
  }
}

/* Por defecto 15, pero queda por delante del menú */
.carousel-indicators {
  z-index: 1 !important;
  bottom: 0 !important;
  margin-bottom: 0 !important;
}

.carousel-indicators li {
  border: 1px solid #73d4ee !important;
}

.carousel-indicators .active {
  background-color: #73d4ee !important;
}

.carousel-caption {
  background: none !important;
  bottom: 0px !important;
}

.carousel-caption h3 {
  color: #fff !important;
  text-transform: uppercase;
  margin-bottom: 5px !important;
}

/* Zoom effect en el slide activo */
.carousel-inner > .item {
  overflow: hidden;
}

/* Empieza ligeramente ampliada */
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
  transform: scale(1.08);
  /* transition: transform 2.5s ease-in-out;  */
  transition: transform 2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Cuando está activo vuelve a tamaño normal */
.carousel-inner > .item.active > img,
.carousel-inner > .item.active > a > img {
  transform: scale(1);
}


/* Vista listado de articulos, modo resumen -> node--article--teaser.html.twig */
.teaser-image-right {
  float: right;
  margin-left: 1em;
  margin-bottom: 0.5em;
}

.teaser-content::after {
  content: "";
  display: table;
  clear: both;
}


/* Field tags -> field-tags.html.twig */
.field-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.field-label {
  margin-right: 0.5em;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.tag-list .tag-item {
  margin-right: 0.5em;
}

/* Blocks in right sidebar */ 
.region-sidebar-second .block {
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 1em;
  background: #fcfcfc;
}

.region-sidebar-second .block h2 {
  font-size: 14px !important;
  border-bottom: 1px solid #ccc;
  padding: 0 10px 10px 10px;
  text-transform: uppercase;
}

.region-sidebar-second .block > div:not(:first-child) {
  padding: 0 10px;
}

.region-sidebar-second .block img {
  width: 80%;
  max-width: 260px !important;
  margin: 0 auto;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .region-sidebar-second .block img  {
    width: 60%;
  }
}

/* Footer widget */
.footerwidget {
  background: none !important;
  background-color: #333 !important;
}

.footerwidget,
.footerwidget h2,
.footerwidget p {
  color: #fff !important;
}

.region-footer-first h2,
.region-footer-second h2,
.region-footer-third h2 {
  padding-bottom: 1em;
}
.region-footer-third {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
}

.footer-logos{
  display: grid;
  gap: 12px;
  align-items: center;
  /* Desktop por defecto */
  grid-template-columns: 1fr;
}

.footer-logos a{
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.footer-logos img{
  width: 100%;
  max-width: 150px;
  height: auto;
  display: block;
}

/* Entre 768px y 991px → 3 por fila */
@media (max-width: 991px){
  .footer-logos{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-logos a{
    justify-content: center;
  }

  .region-footer-first h2,
  .region-footer-second h2,
  .region-footer-third h2 {
    padding-bottom: 0.3em;
  }

  .region-footer-third {
    gap: 0;
  }
}

/* Menos de 768px → 2 por fila */
@media (max-width: 767px){
  .footer-logos{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Footer */
.footer-menu {
  color: #333 !important;
  padding-top: 2em;
}

/* Breadcrumb */
.breadcrumb .separator {
  margin: 0 0.4em;
  color: #999;
}

/* Table style in borsa_laboral (Style used in old table) */
.borsa-laboral-page thead th {
  background: #333;
  color: #fff;
  font-weight: bold;
  padding: 1em 0;
}

.borsa-laboral-page table td,
.borsa-laboral-page table th {
  padding: 0.75em;
  text-align: left;
}

.borsa-laboral-page table tbody tr {
  border-bottom: 1px solid #cdcdcd;
}

.borsa-laboral-page table tbody tr:nth-child(odd) { /* Zebra striping: light background for odd rows */
  background-color: #f6f7f8;
}


/* Comissió de Govern page */
.governing-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.member {
  text-align: center;
}

.member {
  background: #fff;
  border: 1px solid rgba(37, 59, 95, 0.15); /* color corporativo muy sutil */
  border-radius: 8px;
  padding: 0.94rem 0.6rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.member img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  background: #f5f6f8;
  padding: 4px;
}

.member .role {
  font-size: 1rem;
  color: #555;
  margin-top: 0.1rem;
}

.member .name {
  font-weight: bold;
  font-size: 0.95rem;
  margin-top: 0.2em;
}

.member .links {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.member .icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: transparent;
  color: #253b5f;
  border: 2px solid #253b5f;
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.member .icon:hover {
  background-color: #253b5f;
  color: #fff;
}

.member .icon:focus-visible {
  outline: 2px solid #253b5f;
  outline-offset: 2px;
}

.member .icon.linkedin {
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.057rem;
}

.member .icon.mail {
  font-size: 0.95rem;
}


/* Junta Col·legial page */
.junta-list {
  max-width: 100%;
}

.junta-item {
  display: grid;
  grid-template-columns: 2.2fr 1.4fr auto;
  align-items: center;
  gap: 0.5rem;

  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.junta-item:last-child {
  border-bottom: none;
}

.junta-name {
  font-weight: 500;
  font-size: 1rem;
}

.junta-role {
  color: #253b5f;
  font-size: 1rem;
}

.junta-links {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
}

.junta-links a {
  text-decoration: none;
}

.junta-links a:hover,
.junta-links a:focus {
  text-decoration: none;
}

.junta-links .icon.linkedin {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.06rem;
}

@media (max-width: 640px) {
  .junta-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .junta-links {
    justify-content: flex-start;
  }

  .junta-role {
    font-size: 1.1rem;
  }

  .junta-links {
    gap: 0.8rem;
}
}

.junta-list {
  border-top: 2px solid #253b5f;
  padding-top: 0.5rem;
}

/* Delegacions Territorials */
.delegacions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.6rem;
}

.delegacio-card {
  background: #fff;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.delegacio-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #253b5f;
  margin: 0 0 0.8rem;
}

.delegacio-members {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.delegacio-member {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.member-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.member-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.member-links a {
  text-decoration: none;
}

.member-links a:hover,
.member-links a:focus {
  text-decoration: none;
}

.member-links .icon.linkedin {
  font-size: 0.95rem;
  font-weight: 800;
}

/* START */
/* borsa_laboral grid */

/* CARD */
.views-view-responsive-grid__item-inner {
  background: #fff;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  padding: 1.1rem 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  background-color: #f8f8ff;
}

/* HEADER (título + fecha) */
.views-field-title .field-content {
  display: block;
  width: 100%;
  margin-bottom: 0.3rem;
}

.oferta-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.oferta-title {
  flex: 1;
  min-width: 0;
}

.oferta-title a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #253b5f;
  text-decoration: none;
  line-height: 1.3;
}

.oferta-title a:hover {
  text-decoration: underline;
}

.oferta-date {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

/* EMPRESA + UBICACIÓN */
.views-field-field-bl-nom-empresa,
.views-field-field-bl-ubicacio {
  font-size: 0.95em;
  color: #4a5568;
}

.views-field-field-bl-nom-empresa .field-content {
  font-weight: 700;
  color: #1f2937;
}

.views-field-field-bl-ubicacio {
  margin-bottom: 0.5rem;
}

/* SALARIO + DEDICACIÓN */
.views-field-field-bl-rang-salarial,
.views-field-field-bl-dedicacio {
  font-size: 0.9em;
  color: #374151;
}

.views-field-field-bl-dedicacio {
  font-weight: 600;
  color: #6b7280;
}

.views-field-field-bl-rang-salarial .field-content {
  display: flex;
  gap: 0.2rem;
}

.views-field-field-bl-rang-salarial .salary:last-of-type::after {
  content: " b/a";
  margin-left: 0.2rem;
}
/* borsa_laboral grid */ 
/* END */

/* START */
/* Assegurança info */
.coetic-info-box{
  background: rgb(247, 247, 247);
  border: 1px solid rgb(187, 187, 187);
  color: rgb(85, 85, 85);
  font-size: 1em;
  padding: 10px;
  margin: 0;
  box-sizing: border-box;
  max-width: 100%;
}

.coetic-info-content{
  max-width: 100%;
}

.coetic-table-scroll{
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.coetic-coverage-table{
  width: 100%;
  border: 1px solid #ddd;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9em;
  table-layout: fixed;  /* clave para que no se “expanda” por contenido */
}

.coetic-coverage-table td{
  padding: 6px 8px;
  border: 1px solid #ddd;
  vertical-align: top;
}

.coetic-link{
  color: rgb(245, 79, 25) !important;
  text-decoration: none;
}

/* Anchos definidos por la primera fila */
.coetic-coverage-table tr.coetic-coverage-head > td:nth-child(1){ width: 44%; }
.coetic-coverage-table tr.coetic-coverage-head > td:nth-child(2){ width: 18%; }
.coetic-coverage-table tr.coetic-coverage-head > td:nth-child(3){ width: 20%; }
.coetic-coverage-table tr.coetic-coverage-head > td:nth-child(4){ width: 18%; }

/* Comportamiento del texto */
.coetic-coverage-table td:first-child{
  white-space: normal;         /* títulos/descripción puede partir */
  overflow-wrap: anywhere;
}

/* Números SIEMPRE completos (nada de ellipsis) */
.coetic-coverage-table td:nth-child(n+2){
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;         /* por si acaso */
}

/* === TITULOS (primera fila): ellipsis permitido === */
.coetic-coverage-table tr.coetic-coverage-head td{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px){

  .coetic-coverage-table{
    font-size: 0.85em;   /* baja un pelín */
  }

  .coetic-coverage-table td{
    padding: 4px 3px !important;    /* reduce padding */
  }

  /* En móvil, da un poco más de aire a la descripción */
  .coetic-coverage-table tr.coetic-coverage-head > td:nth-child(1){ width: 30%; }
  .coetic-coverage-table tr.coetic-coverage-head > td:nth-child(2){ width: 25%; }
  .coetic-coverage-table tr.coetic-coverage-head > td:nth-child(3){ width: 25%; }
  .coetic-coverage-table tr.coetic-coverage-head > td:nth-child(4){ width: 20%; }
  }

/* Assegurança info */
/* END */

/* Estils per a links interns i externs*/
/* START */
a.link-external {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
}

a.link-external::after {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M7 7h10v10'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

a.link-external::after {
  transition: transform 0.2s ease;
}

a.link-external:hover::after {
  /* transform: translate(0.15em, -0.15em); */
  transform: translate(0.1em, -0.1em);
}

a.link-internal {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
}

a.link-internal::after {
  content: "";
  width: 0.9em;
  height: 0.9em;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h12'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.2s ease;
}

a.link-internal:hover::after {
  transform: translateX(0.1em);
}
/* Estils per a links interns i externs*/
/* ENS */

