/* Breadcrumbs del post: alineado con el TEXTO del cuerpo del artículo.
   Mismo cálculo que .post-header-text (+80px): el cuerpo vive en un
   .section.section-full-width + `.padding 20px` que lo deja en
   (borde de .blog-container) + 60px. En ≤1024px el cuerpo pasa a 30px. */
.blog-breadcrumbs {
  padding: 16px max(80px, calc((100% - 1650px) / 2 + 80px));
  font-size: 14px;
  color: #777;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .blog-breadcrumbs {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (max-width: 900px) {
  .blog-breadcrumbs {
    padding: 16px 30px;
  }
}

.blog-breadcrumbs a {
  color: var(--workmeter-primary-blue, #0B4988);
  text-decoration: none;
}

.blog-breadcrumbs a:hover {
  text-decoration: underline;
}

.blog-breadcrumbs > :not(:last-child)::after {
  content: "\203A"; /* › */
  display: inline-block; /* evita que el subrayado del :hover cubra el separador */
  margin: 0 8px;
  color: #999;
  text-decoration: none;
}

.blog-breadcrumbs [aria-current="page"] {
  color: #777;
}

#related-posts-blog > div {
  box-sizing: border-box;
  padding: 10px;
  width: 33.3333%;
  display: flex;
  flex-direction: column;
}

#related-posts-blog {
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
}

/* Toda la miniatura es clicable (enlaza al articulo). El wrapper es block para
   no alterar el tamano/aspect-ratio del .post-thumb. */
.post-thumb-link {
  display: block;
}

.post-thumb {
  position: relative;
  width: 100%;
  max-width: 357px;
  aspect-ratio: 357 / 238;
  background: #e8f0fa;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagen de color de la categoria, difuminada bajo el titulo. */
.post-thumb-bg {
  position: absolute;
  inset: 0;
  width: 100%;

  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  /* filter: blur(1px); */
  opacity: 1;
}

/* Velo azul de marca que garantiza la legibilidad del titulo superpuesto. */
.post-thumb-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(11,73,136,.78) 0%, rgba(11,73,136,.55) 60%, rgba(11,73,136,.35) 100%);
}

/* Titulo del articulo superpuesto, en la fuente de la pagina (Raleway). */
.post-thumb-title {
  position: relative;
  z-index: 2;
  font-family: inherit;
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  font-size: 22px;
  padding: 0 18px;
  text-shadow: 0 1px 6px rgba(0,0,0,.45);
}

/* Miniaturas de tarjeta a ancho completo de columna (mismo width que el texto
   debajo). Cubre relacionados, ultimos posts del landing, busqueda y categorias. */
#related-posts-blog .post-thumb,
#blog-latest-posts .post-thumb,
.blog-search-results .post-thumb,
#categories-content .post-thumb {
  max-width: none;
}

#related-posts-blog .related-post > div {
  padding-top: 10px;
}

#related-posts-blog .related-post h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.3;
}

/* Titulo (debajo de la miniatura) de las tarjetas de articulo: desactiva el
   hover verde global (a:hover -> --global-color-a-hover) manteniendo el color
   de reposo. Scoped a las tarjetas de blog; no afecta al resto de la web.
   Cubre relacionados, posts por categoria, ultimos posts y resultados de busqueda. */
.related-post h3 a:hover,
.blog-latest-post h3 a:hover {
  color: var(--workmeter-primary-blue, #0B4988);
}

#related-posts-blog .related-post small {
  display: block;
  color: #777;
  margin-bottom: 8px;
}

#related-posts-blog .related-post p {
  margin: 0 0 10px;
}

/* El contenedor de relacionados usa el mismo ancho/centrado/padding que
   .blog-container, para que su borde quede alineado con el contenido del
   artículo (que vive dentro de .blog-container). */
div:has(#related-posts-blog) {
  max-width: 1650px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

#related-posts-blog-title {
    padding: 20px 0;
}

div:has(#related-posts-blog-title):has(#related-posts-blog) {
    display: flex;
    flex-direction: column;
}

#categories-content {
    display: flex;
    flex-wrap: wrap;
}

#categories-content > div {
  width: 33%;
  padding: 20px;
}

/* Blog landing: full-width categories bar above the search layout.
   Same max-width / centering / horizontal padding as .blog-search-layout so
   it aligns with the grid below. Pulled out of the grid main column so the
   category boxes get the full width and wrap into 2 rows instead of 3. */
.main-container.blog-landing-categories {
  max-width: 1650px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Blog landing hero: full-bleed banner with illustrated background
   (fondo_header_cats.png), title + subtitle, two CTAs and stat counters.
   Block-level + no margin = full-width; the inner wrapper keeps content
   aligned with the centered layout. */

  .blog-hero {
  margin: 0;
  background-color: #eef3fb;
  box-sizing: border-box;

  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url(/lib/img/fondo_header_cats.png);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;

  transform: scaleX(-1);
  z-index: 0;
}

.blog-hero > * {
  position: relative;
  z-index: 1;
}

.blog-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 40px 56px;
  box-sizing: border-box;
}

.blog-hero-title {
  margin: 0 0 14px;
  max-width: 620px;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 800;
  color: var(--workmeter-primary-blue, #0B4988);
}

.blog-hero-sub {
  margin: 0 0 28px;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.5;
  color: #4a5a6a;
}

.blog-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.blog-hero-btn {
  padding: 13px 26px;
  font-size: 16px;
  min-width: 230px;                 /* mismo ancho: el texto más largo manda */
  box-sizing: border-box;
  border: 2px solid transparent;    /* reserva los 2px del outline → mismo alto */
}

/* Mismo azul navy que el resto de CTAs del blog (Leer más / Centro de Recursos).
   Scoped a `.primary` para no afectar al botón outline (que no lleva esa clase). */
.blog-hero-btn.primary {
  background-color: var(--workmeter-primary-blue, #0B4988);
}

/* Second CTA: white pill, blue border + blue label (outline), matching the mockup. */
.blog-hero-btn-outline,
.blog-hero-btn-outline:link,
.blog-hero-btn-outline:visited {
  background: #fff;
  color: var(--workmeter-primary-blue, #0B4988);
  border: 2px solid var(--workmeter-primary-blue, #0B4988);
}

.blog-hero-btn-outline:hover {
  background: var(--workmeter-primary-blue, #0B4988);
  color: #fff;
}

.blog-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.blog-hero-stat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.blog-hero-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--workmeter-primary-blue, #0B4988);
}

.blog-hero-stat-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.blog-hero-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--workmeter-primary-blue, #0B4988);
}

.blog-hero-stat-label {
  font-size: 14px;
  color: #5a6a7a;
}

#blog-latest-posts {
  scroll-margin-top: 90px;
}

@media (max-width: 800px) {
  .blog-hero-inner {
    padding: 40px 20px 36px;
  }
  .blog-hero-title {
    font-size: 30px;
  }
  .blog-hero-sub {
    font-size: 16px;
  }
  .blog-hero-actions {
    justify-content: center;
  }
  .blog-hero-stats {
    gap: 24px;
    justify-content: center;
  }
}

/* Blog landing: categories (equal boxes, image left + text right).
   Flex (not grid) so the last, incomplete row centers while full rows
   stay flush. flex-grow fills full rows; max-width caps the boxes of the
   last row so the leftover space splits both sides (→ centered). */
#blog-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 16px 0;
}

#blog-categories .blog-category-item {
  box-sizing: border-box;
  flex: 1 1 260px;
  max-width: 340px;
}

#blog-categories .blog-category-item a {
  display: flex;
  align-items: stretch;
  height: 90px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f9fe;
  color: var(--workmeter-primary-blue, #0B4988);
  text-decoration: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}

#blog-categories .blog-category-item a:hover {
  border-color: var(--workmeter-primary-blue, #0B4988);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

#blog-categories .blog-category-item img {
  flex: 0 0 90px;
  width: 90px;
  height: 100%;
  padding: 12px;
  box-sizing: border-box;
  object-fit: contain;
  display: block;
}

#blog-categories .blog-category-item span {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

/* Blog landing: "show more / less categories" toggle.
   Sits below the categories grid, centered. Collapsed = only the first row of
   .blog-category-item is visible (rows beyond it are hidden inline by JS in
   webpage_blog.html). Hidden by default until JS confirms there is more than one row. */
.blog-categories-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 4px auto 16px;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  color: var(--workmeter-primary-blue, #0B4988);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.blog-categories-toggle:hover {
  background: #f5f7fa;
  border-color: var(--workmeter-primary-blue, #0B4988);
}

.blog-categories-toggle-icon {
  transition: transform 0.2s ease;
}

.blog-categories-toggle.is-expanded .blog-categories-toggle-icon {
  transform: rotate(180deg);
}

/* Category selector (dormant component) keeps its original look */
#category-selector .category-item a {
  text-decoration: none;
  color: inherit;
}

#category-selector .category-item:hover {
  opacity: 0.7;
  cursor: pointer;
}

/* Blog landing: latest posts */
#blog-latest-posts {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  max-width: 1650px;
}

#blog-latest-posts > div {
  width: 33%;
  padding: 10px;
}

/* Pagination (shared) */
#blog-latest-posts-pagination,
#categories-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 30px 0;
}

#blog-latest-posts-pagination a,
#categories-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: var(--workmeter-primary-blue, #0B4988);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

#blog-latest-posts-pagination a:hover,
#categories-pagination a:hover {
  background: #f0f4f8;
  border-color: var(--workmeter-primary-blue, #0B4988);
}

#blog-latest-posts-pagination a[style*="bold"],
#categories-pagination a[style*="bold"] {
  background: var(--workmeter-primary-blue, #0B4988);
  color: #fff;
  border-color: var(--workmeter-primary-blue, #0B4988);
}

#blog-latest-posts-pagination span,
#categories-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 14px;
  color: #999;
}

@media (max-width: 800px) {
  #related-posts-blog > div {
    width: 100%;
  }

  #blog-latest-posts > div {
    width: 100%;
  }
}

/* Blog landing + category: 2-column layout with sidebar.
   Class names are prefixed `blog-search-` to avoid colliding with
   .blog-layout / .blog-sidebar / .blog-content already defined in main.css. */
.main-container.blog-search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  max-width: 1650px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

.main-container.blog-search-layout .blog-search-main {
  min-width: 0;
  width: auto;
  max-width: none;
  flex: initial;
}

.main-container.blog-search-layout .blog-search-aside {
  position: sticky;
  top: 20px;
  align-self: start;
  width: 100%;
  max-width: none;
  flex: initial;
  display: block;
  box-sizing: border-box;
  z-index: 1;
}

/* Cuando se usa este layout con secciones de contenido (ej. webpage_con_te_llamamos_sidebar.html),
   la directiva .section-full-width no debe romper el grid: si lo hace, la seccion se extiende
   a 100vw y queda por debajo del sidebar sticky, generando solapamiento visual.
   Constreñimos cualquier seccion al ancho de su columna. */
.main-container.blog-search-layout .blog-search-main .section.section-full-width,
.main-container.blog-search-layout .blog-search-main .section.section-full-width.section-full-width-content {
  width: auto;
  left: auto;
  margin-left: 0;
  margin-right: 0;
  padding-left: 40px;
  padding-right: 40px;
}

.main-container.blog-search-layout .blog-search-main .section > * {
  max-width: 100%;
}

/* Layout webpage_con_te_llamamos_sidebar.html: en movil/tablet el sidebar
   (buscador + ebook + carrusel) debe ir DESPUES del contenido, no antes,
   porque aqui el contenido es lo principal (a diferencia de /es/blog/). */
@media (max-width: 800px) {
  .main-container.blog-search-layout.webpage-with-sidebar .blog-search-main {
    order: 0;
  }
  .main-container.blog-search-layout.webpage-with-sidebar .blog-search-aside {
    order: 1;
    margin-top: 20px;
  }

  /* Reducir padding interno de secciones a media baja para no comer el viewport */
  .main-container.blog-search-layout.webpage-with-sidebar .blog-search-main .section {
    padding: 24px 20px;
  }
  .main-container.blog-search-layout.webpage-with-sidebar .blog-search-main .section.section-full-width,
  .main-container.blog-search-layout.webpage-with-sidebar .blog-search-main .section.section-full-width.section-full-width-content {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 480px) {
  .main-container.blog-search-layout.webpage-with-sidebar .blog-search-main .section {
    padding: 20px 14px;
  }
  .main-container.blog-search-layout.webpage-with-sidebar .blog-search-main .section.section-full-width,
  .main-container.blog-search-layout.webpage-with-sidebar .blog-search-main .section.section-full-width.section-full-width-content {
    padding-left: 14px;
    padding-right: 14px;
  }
}

.blog-search-form-box {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  padding: 6px;
  box-sizing: border-box;
  width: 100%;
}

.blog-search-form-box input[type="search"] {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid transparent;
  outline: none;
  padding: 0 10px;
  margin: 0;
  font-size: 14px;
  font-family: inherit;
  line-height: normal;
  color: #1f2937;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 6px;
}

.blog-search-form-box input[type="search"]::placeholder {
  color: #9aa3af;
  opacity: 1;
}

.blog-search-form-box input[type="search"]::-webkit-search-decoration,
.blog-search-form-box input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.blog-search-form-box input[type="search"]:focus {
  border-color: var(--workmeter-primary-blue, #0B4988);
}

/* Override global `button, .wm-btn` reset so the lupa button stays 40x40 */
.blog-search-form-box button[type="submit"] {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  margin: 0;
  font-size: 14px;
  font-weight: normal;
  line-height: 1;
  border: none;
  border-radius: 6px;
  background: var(--workmeter-primary-blue, #0B4988);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s, opacity 0.15s;
  overflow: visible;
}

.blog-search-form-box button[type="submit"]:hover:not([disabled]) {
  background: #083b6e;
}

.blog-search-form-box button[type="submit"][disabled] {
  background: #9aa3af;
  cursor: not-allowed;
}

.blog-search-form-box button[type="submit"][disabled]:hover {
  background: #9aa3af;
}

.blog-search-form-box button[type="submit"] svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: #ffffff;
  flex: none;
  pointer-events: none;
  opacity: 1;
}

#blog-search-hint {
  flex: 1 0 100%;
  padding: 4px 6px 0;
  color: #c04040;
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Search results (reuse related-post card style) */
.blog-search-title {
  padding: 20px 10px 10px;
  font-size: 22px;
}

.blog-search-results {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
}

.blog-search-results > .related-post {
  width: 33.3333%;
  padding: 10px;
  box-sizing: border-box;
}

.blog-search-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 30px 0;
  flex-wrap: wrap;
}

.blog-search-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: var(--workmeter-primary-blue, #0B4988);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.blog-search-pagination a:hover {
  background: #f0f4f8;
  border-color: var(--workmeter-primary-blue, #0B4988);
}

.blog-search-pagination a[style*="bold"] {
  background: var(--workmeter-primary-blue, #0B4988);
  color: #fff;
  border-color: var(--workmeter-primary-blue, #0B4988);
}

.blog-search-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 14px;
  color: #999;
}

/* Tablet: 2 cards per row in search results */
@media (max-width: 1100px) {
  .blog-search-results > .related-post {
    width: 50%;
  }
}

/* Mobile: collapse layout, sidebar on top, full-width cards */
@media (max-width: 800px) {
  .main-container.blog-search-layout {
    grid-template-columns: 1fr;
    padding: 15px;
    gap: 16px;
  }

  .main-container.blog-search-layout .blog-search-aside {
    position: static;
    order: -1;
    max-width: 100%;
  }

  .blog-search-results > .related-post {
    width: 100%;
  }

  .blog-search-title {
    padding: 10px 5px;
    font-size: 18px;
  }
}

/* ============================================================
   Sidebar resources block (between search box and carousel)
   ============================================================ */
.sidebar-resources {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 28px 24px;
  border-radius: 16px;
  box-sizing: border-box;
  background: linear-gradient(160deg, #eef4fb 0%, #dbe8f7 100%);
  border: 1px solid #d6e3f2;
}

/* Onda decorativa inferior (SVG inline, sin asset externo) */
.sidebar-resources::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%2090'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0%2055%20C%2070%2025%2C%20150%2080%2C%20230%2055%20S%20320%2045%2C%20320%2060%20L320%2090%20L0%2090%20Z'%20fill='%23ffffff'%20fill-opacity='0.45'/%3E%3Cpath%20d='M0%2072%20C%2080%2050%2C%20160%2095%2C%20240%2072%20S%20320%2068%2C%20320%2078%20L320%2090%20L0%2090%20Z'%20fill='%233479B7'%20fill-opacity='0.07'/%3E%3C/svg%3E") no-repeat bottom center / cover;
  pointer-events: none;
}

.sidebar-resources > * {
  position: relative;
  z-index: 1;
}

.sidebar-resources-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(11, 73, 136, 0.12);
  color: var(--workmeter-primary-blue, #0B4988);
}

.sidebar-resources-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--workmeter-primary-blue, #0B4988);
  text-align: left;
}

.sidebar-resources-desc {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: #4a5a6e;
}

.sidebar-resources-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  background: var(--workmeter-primary-blue, #0B4988);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(11, 73, 136, 0.25);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.sidebar-resources-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.sidebar-resources-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.sidebar-resources-list li {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  line-height: 1.3;
  color: #3a4a5e;
}

.sidebar-resources-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%233479B7'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='10'/%3E%3Cpath%20d='M8%2012l3%203%205-6'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ============================================================
   Sidebar carousel (below blog search box)
   ============================================================ */
.sidebar-carousel {
  position: relative;
  width: 100%;
  margin-top: 16px;
  box-sizing: border-box;
}

.sidebar-carousel-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.sidebar-carousel-track {
  display: flex;
  width: 100%;
  transition: transform .6s ease-in-out;
  will-change: transform;
}

.sidebar-carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: block;
  line-height: 0;
  text-decoration: none;
}

.sidebar-carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.sidebar-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.sidebar-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d0d7de;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.sidebar-carousel-dot:hover {
  background: #9aa3af;
}

.sidebar-carousel-dot.is-active {
  background: var(--workmeter-primary-blue, #0B4988);
  transform: scale(1.15);
}

.sidebar-carousel-dot.is-active:hover {
  background: var(--workmeter-primary-blue, #0B4988);
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-carousel-track {
    transition: none;
  }
}

/* Enlace "Ver artículo principal" hacia la pilar page del cluster.
   Va dentro de .content-container, así que se alinea con el texto del
   artículo y con el bloque de relacionados sin margen lateral extra. */
.pilar-link-container {
  margin: 16px 0;
}

.back-to-pilar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--workmeter-primary-blue, #0B4988);
  border-radius: 6px;
  color: var(--workmeter-primary-blue, #0B4988);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.back-to-pilar::before {
  content: "←";
}

.back-to-pilar:hover,
.back-to-pilar:focus {
  background: var(--workmeter-primary-blue, #0B4988);
  color: #fff;
}

/* Anula el salto de línea suelto (<br>) entre dos párrafos en el cuerpo del
   artículo. Solo afecta a un <br> que esté inmediatamente entre dos <p>; los
   <br> dentro de un <p> (saltos internos) y los dobles <br> (espacio
   intencional) se conservan. */
.blog-content p + br:has(+ p) {
  display: none;
}

/* ===== Blog landing: bloque destacado (1 grande + 2 laterales) ===== */
#blog-featured {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.blog-featured-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 48px;
  border-radius: 16px;
  text-decoration: none;
  color: #0b1f3a;
  background-color: #eaf2fb;
  background-image:
    linear-gradient(135deg, #eaf2fb 0%, #dcebfa 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 400'%3E%3Cg fill='none' stroke='%23b9d4f0' stroke-width='2'%3E%3Cpath d='M0 320 C 150 280 300 340 450 250 600 180 600 180 600 180'/%3E%3C/g%3E%3Cg fill='%23cfe2f7'%3E%3Crect x='430' y='200' width='28' height='120'/%3E%3Crect x='470' y='150' width='28' height='170'/%3E%3Crect x='510' y='230' width='28' height='90'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center, bottom right;
  background-size: cover, 55% auto;
  overflow: hidden;
}
.blog-featured-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #3479b7;
}
.blog-featured-title { font-size: 34px; line-height: 1.15; margin: 0; color: #0b1f3a; }
.blog-featured-desc { font-size: 16px; line-height: 1.5; color: #3a4a5e; max-width: 60%; }
.blog-featured-main .blog-featured-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--workmeter-primary-blue, #0B4988);
  color: #fff;
  font-weight: 600;
  width: fit-content;
}
.blog-featured-sides { display: flex; flex-direction: column; gap: 24px; }
.blog-featured-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e6edf5;
  box-shadow: 0 2px 10px rgba(11, 31, 58, 0.05);
  text-decoration: none;
  color: #0b1f3a;
}
.blog-featured-side h3 { font-size: 19px; line-height: 1.25; margin: 0; }
.blog-featured-side small { color: #6b7a8d; }
.blog-featured-side .blog-featured-cta { color: #3479b7; font-weight: 600; }

@media (max-width: 900px) {
  #blog-featured { grid-template-columns: 1fr; }
  .blog-featured-main { padding: 32px; }
  .blog-featured-title { font-size: 26px; }
  .blog-featured-desc { max-width: 100%; }
}
