.formato-texto {
  display: inline !important;
  text-decoration: none;
  color: rgba(25, 27, 29, 0.6);
  font-size: 14px;
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 28px;
  font: inherit;
}

/* Normalize blog body typography + spacing to match the top section */
.post-content .text-wrapper p,
.post-content .text-wrapper div,
.post-content .text-wrapper li {
  color: rgba(25, 27, 29, 0.6);
  font-size: 14px;
  line-height: 28px;
  font-family: inherit;
  text-align: justify;
  text-justify: inter-word;
}

/* Keep headings and UI elements left-aligned */
.post-content .text-wrapper h1,
.post-content .text-wrapper h2,
.post-content .text-wrapper h3,
.post-content .text-wrapper h4,
.post-content .text-wrapper h5,
.post-content .text-wrapper .FAQ,
.post-content .text-wrapper .table,
.post-content .text-wrapper .accordion,
.post-content .text-wrapper .accordion * {
  text-align: left !important;
}

.post-content .text-wrapper h2,
.post-content .text-wrapper h3,
.post-content .text-wrapper h4,
.post-content .text-wrapper h5,
.post-content .text-wrapper .FAQ {
  color: #111;
  text-align: left;
  margin: 20px 0 10px;
}

/* Keep SEO heading tags where they are, but render them inline when embedded in text */
.post-content .text-wrapper p h1,
.post-content .text-wrapper p h2,
.post-content .text-wrapper p h3,
.post-content .text-wrapper p h4,
.post-content .text-wrapper p h5,
.post-content .text-wrapper li h1,
.post-content .text-wrapper li h2,
.post-content .text-wrapper li h3,
.post-content .text-wrapper li h4,
.post-content .text-wrapper li h5,
.post-content .text-wrapper b h1,
.post-content .text-wrapper b h2,
.post-content .text-wrapper b h3,
.post-content .text-wrapper b h4,
.post-content .text-wrapper b h5 {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

/*
          Some SEO tags (h2/h3/...) are intentionally inserted inside phrases.
          Browsers auto-fix invalid nesting (e.g. <p>...<h2>...</h2>...</p>) by
          moving the heading OUT of the <p>, which makes it look huge and breaks flow.
          We must NOT move/remove tags, so we restyle headings in those specific blocks.
        */
.post-content .text-wrapper .formato-texto h1,
.post-content .text-wrapper .formato-texto h2,
.post-content .text-wrapper .formato-texto h3,
.post-content .text-wrapper .formato-texto h4,
.post-content .text-wrapper .formato-texto h5,
.post-content .text-wrapper .titulo-info-cuadros h1,
.post-content .text-wrapper .titulo-info-cuadros h2,
.post-content .text-wrapper .titulo-info-cuadros h3,
.post-content .text-wrapper .titulo-info-cuadros h4,
.post-content .text-wrapper .titulo-info-cuadros h5,
.post-content .text-wrapper .texto-info-cuadros h1,
.post-content .text-wrapper .texto-info-cuadros h2,
.post-content .text-wrapper .texto-info-cuadros h3,
.post-content .text-wrapper .texto-info-cuadros h4,
.post-content .text-wrapper .texto-info-cuadros h5 {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

/* Tighten the spacing around the auto-extracted headings */
.post-content .text-wrapper .formato-texto h1,
.post-content .text-wrapper .formato-texto h2,
.post-content .text-wrapper .formato-texto h3,
.post-content .text-wrapper .formato-texto h4,
.post-content .text-wrapper .formato-texto h5,
.post-content .text-wrapper .titulo-info-cuadros h1,
.post-content .text-wrapper .titulo-info-cuadros h2,
.post-content .text-wrapper .titulo-info-cuadros h3,
.post-content .text-wrapper .titulo-info-cuadros h4,
.post-content .text-wrapper .titulo-info-cuadros h5,
.post-content .text-wrapper .texto-info-cuadros h1,
.post-content .text-wrapper .texto-info-cuadros h2,
.post-content .text-wrapper .texto-info-cuadros h3,
.post-content .text-wrapper .texto-info-cuadros h4,
.post-content .text-wrapper .texto-info-cuadros h5 {
  vertical-align: baseline;
}

/* If a heading ends up between two paragraphs, remove the extra gap */
.post-content .text-wrapper .texto-info-cuadros h1+p,
.post-content .text-wrapper .texto-info-cuadros h2+p,
.post-content .text-wrapper .texto-info-cuadros h3+p,
.post-content .text-wrapper .texto-info-cuadros h4+p,
.post-content .text-wrapper .texto-info-cuadros h5+p {
  margin-top: 0 !important;
}

/* Inline SEO sentence wrapper (use instead of invalid <p><h2>..</h2></p>) */
.post-content .text-wrapper .hm-seo-inline {
  color: rgba(25, 27, 29, 0.6) !important;
  font-size: 14px;
  line-height: 28px;
  font-family: inherit;
  text-align: justify;
  text-justify: inter-word;
  margin: 0 0 1rem;
}

/* Title line where only part is wrapped in an SEO heading tag */
.post-content .text-wrapper .hm-seo-title-inline {
  color: #111 !important;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.2;
  font-weight: 700;
  margin: 20px 0 10px;
}

.post-content .text-wrapper .hm-seo-title-inline h2,
.hm-seo-title-inline h3,
.hm-seo-title-inline h4 {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

/* Remove unintended centering from Bootstrap helpers inside content */
.post-content .text-wrapper .container,
.post-content .text-wrapper .container.text-center,
.post-content .text-wrapper .text-center {
  text-align: left !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
}

.post-content .text-wrapper .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-content: flex-start !important;
}

.post-content .text-wrapper [class^="col-"],
.post-content .text-wrapper [class*=" col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: left !important;
}

/* Ensure left edges align for all custom blocks */
.post-content .text-wrapper .izquierda,
.post-content .text-wrapper .texto-info-cuadros,
.post-content .text-wrapper .titulo-info-cuadros,
.post-content .text-wrapper .info-cuadros,
.post-content .text-wrapper .accordion,
.post-content .text-wrapper .accordion-body {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Make "info-cuadros" blocks consistent */
.post-content .text-wrapper .info-cuadros {
  width: 100%;
  margin: 18px 0;
}

.post-content .text-wrapper .titulo-info-cuadros p,
.post-content .text-wrapper .titulo-info-cuadros a {
  color: #111 !important;
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 8px;
  text-decoration: none;
}

.post-content .text-wrapper .texto-info-cuadros p,
.post-content .text-wrapper .izquierda p,
.post-content .text-wrapper .izquierda div,
.post-content .text-wrapper .col-12 {
  color: rgba(25, 27, 29, 0.6) !important;
}

/* Images inside content should never overflow or look "floating centered" */
.post-content .text-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* FAQ uses Bootstrap default styles (copied from base file) */
.post-content .text-wrapper .accordion-button h3,
.post-content .text-wrapper .accordion-button h4,
.post-content .text-wrapper .accordion-button h5 {
  font-size: 16px !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  font-weight: 600 !important;
}

/* Footer compacto estilo referencia */
#footer.site-footer {
  padding-top: 60px !important;
  background: #000 !important;
}

/* Primera fila del footer */
#footer>.wrapper:first-of-type {
  display: grid !important;
  grid-template-columns: 1.1fr 0.8fr 0.7fr 1.4fr;
  align-items: start;
  column-gap: 70px;
}

/* Quita el sistema viejo de columnas */
#footer .footer-widget {
  width: auto !important;
  float: none !important;
}

/* Logo */
#footer .footer-logo img {
  max-width: 230px;
  height: auto;
}

#footer .copyright-text {
  margin-top: 22px;
}

/* Textos */
#footer .social-list-widget ul,
#footer .footer-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#footer .social-list-widget li {
  margin-bottom: 22px;
}

#footer a,
#footer p {
  color: #fff !important;
  font-size: 18px;
  line-height: 1.8;
}

/* Contactos derecha */
#footer .alioth-text-box p {
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
}

#footer .alioth-text-box b {
  font-weight: 700;
}

/* Segunda fila: correo + redes */
#footer>.wrapper:last-of-type {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  /* bring socials closer to email */
  margin-top: -50px;
  /* avoid overlapping phone numbers */
  padding-top: 0 !important;
}

/* Correo */
#footer .footer_cta {
  width: auto !important;
  flex: 0 0 auto;
}

#footer .big-button a {
  font-size: 35px !important;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

/* Redes */
#footer .footer-menu ul {
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: center;
  /* less space between icons */
}

#footer .footer-menu li {
  margin: 0;
}

#footer .footer-menu img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

#footer .footer-menu a {
  display: inline-flex;
  align-items: center;
}

/* Responsive */
@media (max-width: 992px) {
  #footer>.wrapper:first-of-type {
    grid-template-columns: 1fr 1fr;
    row-gap: 40px;
  }

  #footer>.wrapper:last-of-type {
    margin-top: 40px;
    flex-wrap: wrap;
    gap: 30px;
  }

  #footer .big-button a {
    font-size: 30px !important;
  }
}

@media (max-width: 600px) {
  #footer>.wrapper:first-of-type {
    grid-template-columns: 1fr;
  }

  #footer>.wrapper:last-of-type {
    margin-top: 30px;
  }

  #footer .big-button a {
    font-size: 24px !important;
    white-space: normal;
  }

  #footer .footer-menu ul {
    gap: 20px;
    flex-wrap: wrap;
  }
}

/* Fine alignment fixes for "¿Por qué destaca?" blocks */
.post-content .text-wrapper .pq-title,
.post-content .text-wrapper .pq-body {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.post-content .text-wrapper .pq-title {
  margin: 0 0 8px;
}

.post-content .text-wrapper .pq-body {
  margin: 0 0 14px;
}

/* Two-column "¿Por qué destaca?" layout: more gap + slimmer image */
.post-content .text-wrapper .pq-split {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-top: 6px;
}

.post-content .text-wrapper .pq-text {
  flex: 1 1 56%;
  max-width: 56%;
}

.post-content .text-wrapper .pq-media {
  flex: 1 1 44%;
  max-width: 44%;
  padding: 0 !important;
  /* remove inline padding effect */
}

.post-content .text-wrapper .pq-media img {
  width: 100% !important;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 5px;
}

@media (max-width: 900px) {
  .post-content .text-wrapper .pq-split {
    flex-direction: column;
    gap: 16px;
  }

  .post-content .text-wrapper .pq-text,
  .post-content .text-wrapper .pq-media {
    max-width: 100%;
  }

  /* Bootstrap .col-6 forces 50% width; override for mobile stack */
  .post-content .text-wrapper .pq-split .col-6 {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Keep paragraph justified on mobile too */
  .post-content .text-wrapper .pq-body {
    text-align: justify !important;
    text-justify: inter-word !important;
    hyphens: auto;
  }
}