/* Estilos propios del blog: FAQ, hero del post, info-cuadros y bloques "¿Por qué
   destaca?". La tipografía del cuerpo del texto ya NO vive acá: se movió a
   css/rich-text.css, que blog-head.php carga ANTES que este archivo para que lo
   específico del blog pueda pisar a lo común.

   Al final hay overrides de #footer y .site-header: no son del blog ni del
   contenido, son componentes globales reestilizados solo en estas páginas. */

/* Keep headings and UI elements left-aligned */
.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 .FAQ {
  color: #111;
  text-align: left;
  margin: 20px 0 10px;
}

/*
          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 .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 .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;
}

/* 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;
}

/* 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;
  }
}

.alioth-post .post-header .post-image.hero-cap {
  height: 30vh !important;
  overflow: hidden;
}
.alioth-post .post-header .post-image.hero-cap img {
  width: 100%;
  height: 100%;
  object-position: center;
}
@media (min-width: 992px) {
  .alioth-post .post-header .post-image.hero-cap img {
    object-fit: fill;
  }
}
@media (max-width: 991.98px) {
  .alioth-post .post-header .post-image.hero-cap img {
    object-fit: cover;
  }
}

.wrapper-full .alioth-page-nav .page-title {
  line-height: 1;
}
body[data-header-layout="light"] .site-header {
    transition: background-color 0.3s ease;
}
body[data-header-layout="light"] .site-header.nav-scrolled {
    background-color: #000 !important;
}

.site-header.light .menu-toggle span:not(.toggle-line) {
    color: #fff;
}

/* FAQ del blog (blog/components/blog-faq.php) */

.post-content .text-wrapper .blog-faq-bloque {
  margin: 34px 0 10px;
}

.post-content .text-wrapper .blog-faq-titulo {
  color: #111 !important;
  font-size: 2rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.06em;
  text-align: left !important;
  margin: 0 0 18px !important;
}

.post-content .text-wrapper .blog-faq {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
  padding: 0 20px;
  margin: 0 0 12px;
}

.post-content .text-wrapper .blog-faq[open] {
  border-color: #d8d8d8;
}

.post-content .text-wrapper .blog-faq > summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 18px 34px 18px 0;
  color: #111 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: 0;
  text-align: left !important;
}

.post-content .text-wrapper .blog-faq > summary::-webkit-details-marker {
  display: none;
}

.post-content .text-wrapper .blog-faq > summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: #191b1d;
  background: #ffda00;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -1px;
}

.post-content .text-wrapper .blog-faq[open] > summary::after {
  content: "\2212";
}

.post-content .text-wrapper .blog-faq__answer {
  padding: 0 0 18px;
  color: rgba(25, 27, 29, 0.6) !important;
  font-size: 14px !important;
  line-height: 28px !important;
  text-align: justify;
  text-justify: inter-word;
}

/* Título y pregunta: todo lo de adentro se dibuja en línea con la tipografía del padre */
.post-content .text-wrapper .blog-faq-titulo :is(h1, h2, h3, h4, h5, h6, p, div, span, strong, b, em, i),
.post-content .text-wrapper .blog-faq > summary :is(h1, h2, h3, h4, h5, h6, p, div, span, strong, b, em, i) {
  display: inline !important;
  font: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  font-style: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  color: inherit !important;
  text-align: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Respuesta: los encabezados quedan como bloque pero con la tipografía del párrafo */
.post-content .text-wrapper .blog-faq__answer :is(h1, h2, h3, h4, h5, h6) {
  display: block;
  font: inherit !important;
  font-size: inherit !important;
  font-weight: 600 !important;
  font-style: normal !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  color: inherit !important;
  text-align: inherit !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
}

/* Encabezado a mitad de frase: en línea para no partir la oración */
.post-content .text-wrapper .blog-faq__answer :is(h1, h2, h3, h4, h5, h6).d-inline,
.post-content .text-wrapper .blog-faq__answer :is(p, li, b, strong, em, i, span, div) :is(h1, h2, h3, h4, h5, h6) {
  display: inline !important;
  font-weight: inherit !important;
  margin: 0 !important;
}

.post-content .text-wrapper .blog-faq__answer :is(p, div) {
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  text-align: inherit;
  margin: 0 0 12px;
}

.post-content .text-wrapper .blog-faq__answer > *:first-child {
  margin-top: 0 !important;
}

.post-content .text-wrapper .blog-faq__answer > *:last-child {
  margin-bottom: 0 !important;
}

/* Enlaces, listas y negritas: sí conservan estilo propio */
.post-content .text-wrapper .blog-faq__answer a {
  color: #111 !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content .text-wrapper .blog-faq__answer a:hover {
  color: #191b1d !important;
  text-decoration-color: #ffda00;
}

.post-content .text-wrapper .blog-faq__answer :is(strong, b) {
  color: #111;
  font-weight: 600;
}

.post-content .text-wrapper .blog-faq__answer ul,
.post-content .text-wrapper .blog-faq__answer ol {
  margin: 0 0 12px;
  padding-left: 22px;
  text-align: left;
}

.post-content .text-wrapper .blog-faq__answer ul {
  list-style: disc outside;
}

.post-content .text-wrapper .blog-faq__answer ol {
  list-style: decimal outside;
}

.post-content .text-wrapper .blog-faq__answer li {
  display: list-item;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  text-align: left;
  margin: 0 0 4px;
}

@media (max-width: 575px) {
  .post-content .text-wrapper .blog-faq {
    padding: 0 16px;
  }

  .post-content .text-wrapper .blog-faq > summary {
    padding: 15px 30px 15px 0;
    font-size: 15px !important;
  }

  .post-content .text-wrapper .blog-faq-titulo {
    font-size: 1.6rem !important;
  }
}
