/*
 Theme Name:   Kale Pro - Child
 Template:     kale-pro
 Version:      1.1.0
 Text Domain:  kale-pro-child
*/


body.logged-in .sidebar,
body.admin-bar .sidebar {
  margin-top: 0 !important;
  top: 0 !important;
  transform: none !important;
}
body.logged-in .sidebar {
  position: relative !important;
}



/* banner reserva de espacio */

@media (min-width: 1024px) {
  .frontpage-banner {
    min-height: 350px;
  }
}

/* =========================================================
   ACCESIBILIDAD MÓVIL – ÁREAS TÁCTILES EN EL FOOTER
   =========================================================
   PROBLEMA:
   Lighthouse (modo móvil) detecta que los enlaces del footer
   (Política de privacidad, Cookies, Contacto, etc.)
   no cumplen el tamaño mínimo recomendado para interacción táctil.


   IMPORTANTE:
   Este bloque NO es decorativo.
   NO eliminar ni reducir el padding sin volver a pasar Lighthouse.
   ========================================================= */

@media (max-width: 768px) {

  .footer a {
    display: inline-block;   /* Asegura área clicable real */
    padding: 12px 14px;      /* Amplía la superficie táctil */
    margin: 6px 4px;         /* Evita enlaces demasiado juntos */
    line-height: 1.6;        /* Mejora legibilidad y altura */
  }

}

/* Entradas */
.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4,

/* Páginas (Kale Pro usa page-content) */
.page .page-content h2,
.page .page-content h3,
.page .page-content h4 {
    margin-top: 2.2em;
    margin-bottom: 0.8em;
    line-height: 1.3;
}

/* Justificar solo párrafos SIN alineación explícita */
.entry-content p:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right),
.page-content p:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right) {
    text-align: justify;
    hyphens: none;
}





#breadcrumbs {
  font-size: 14px;
  color: #555;
  margin-bottom: 15px;
}
#breadcrumbs a {
  color: #9b6cb7;
  text-decoration: none;
}
#breadcrumbs a:hover {
  text-decoration: underline;
}



.pagination-blog-feed a,
.pagination-blog-feed span {
  display:inline-block;
  margin:0 5px;
  padding:6px 10px;
  font-size:15px;
  color:#0e121e;
}

.pagination-blog-feed .current {
  color:#e60073;
  font-weight:600;
}


.category-header-full {
    margin: 40px auto 60px;
    max-width: 900px;
    text-align: center;
}

.category-header-full .block-title {
    font-family: 'Georgia', serif;
    font-size: 1.8em;
    letter-spacing: 2px;
    color: #008b94; /* turquesa Afectos */
    text-transform: uppercase;
    font-weight: 600;
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.category-header-full .block-title::before,
.category-header-full .block-title::after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 1px;
    background: #ccc;
    margin: 0 12px;
    vertical-align: middle;
}


/* Cabecera de categorías (Afectos unificado - fuente Lato) */
.category-header-full {
    margin: 50px auto 60px;
    max-width: 650px;
    text-align: center;
}

.category-header-full .block-title {
    font-family: 'Lato', sans-serif;
    font-size: 2rem;
    letter-spacing: 1.5px;
    color: #008b94; /* turquesa corporativo Afectos */
    text-transform: uppercase;
    font-weight: 900;
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}



/* Cabecera de categoría - alineada al ancho de los posts */
.category-header-full {
    width: 100%;
    max-width: none;
    margin: 50px 0 60px;
    text-align: center;
    padding: 0;
}

/* Ajusta solo el contenido del texto */
.archive-description {
    font-family: 'Lato', sans-serif;
    font-size: 1.8rem;
    line-height: 2.9rem;
    color: #444;
    margin: 0 auto 30px;
    text-align: justify;
    font-weight: 400;
    padding: 0 6%; /* ancho respirable, se adapta al viewport */
    box-sizing: border-box;
    display: block;
    max-width: none;
}



/* Cabecera de categoría - ancho completo real */
.category-header-full {
    position: relative;
    width: 100vw; /* ocupa todo el ancho de la ventana */
    left: 50%;
    right: 50%;
    margin-left: -50vw; /* compensa los márgenes del contenedor */
    margin-right: -50vw;
    text-align: center;
    background: #fff; /* opcional: fondo uniforme */
    padding: 60px 12%;
    box-sizing: border-box;
}

/* Título */
.category-header-full .block-title {
    font-family: 'Lato', sans-serif;
    font-size: 2rem;
    letter-spacing: 1.5px;
    color: #008b94;
    text-transform: uppercase;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.category-header-full .block-title::before,
.category-header-full .block-title::after {
    content: "";
    display: inline-block;
    width: 50px;
    height: 1px;
    background: #d6d6d6;
    margin: 0 12px;
    vertical-align: middle;
}

/* Texto descriptivo */
.archive-description {
    font-family: 'Lato', sans-serif;
    font-size: 1.8rem;
    line-height: 2.9rem;
    color: #444;
    margin: 0 auto;
    text-align: justify;
    font-weight: 400;
    max-width: 900px; /* límite visual para no quedar demasiado ancho */
}

/* Ajuste responsive */
@media (max-width: 768px) {
    .category-header-full {
        padding: 40px 8%;
    }
    .archive-description {
        font-size: 1.4rem;
        line-height: 2.4rem;
        max-width: 100%;
    }
}

/* Estilo personalizado SOLO para el botón del widget Jetpack de Suscripción */
.widget_blog_subscription .wp-block-button__link,
.jetpack_subscription_widget .wp-block-button__link {
    background-color: #008080 !important; /* tu color turquesa/clásico de Afectos */
    color: #ffffff !important;
    border-radius: 30px !important;
    border: none !important;
    padding: 12px 20px !important;
    width: 100% !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
    display: inline-block !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

/* Hover */
.widget_blog_subscription .wp-block-button__link:hover,
.jetpack_subscription_widget .wp-block-button__link:hover {
    background-color: #006b6b !important; /* tono más oscuro */
    color: #ffffff !important;
}

/* A PARTIR DE AQUI BOTON DE SUSCRIPCION */


	/* === 🎯 Ajuste visual del sidebar (alineación y posición) === */
/* Corrige la alineación del bloque de búsqueda con el grid principal del blog */

.sidebar,
.sidebar-primary,
.widget-area {
  margin-top: 30px 
	
		!important; /* baja el sidebar completo un poco */
}

/* Caja de búsqueda dentro del sidebar */
.sidebar .widget_search,
.sidebar-primary .widget_search,
.widget-area .widget_search {
  margin-top: 28px !important;  /* separa la caja de búsqueda del borde superior */
  margin-left: 5px !important; /* corrige desplazamiento horizontal */
  width: calc(100% + 12px) !important; /* mantiene el fondo gris alineado */
  box-sizing: border-box;
}


/* === Estilo del botón SEARCH dentro del widget de búsqueda === */

/* Centra el botón dentro del contenedor */
#search-2.widget.widget_search .form-actions {
  text-align: center !important;
}

/* Botón SEARCH (nuevo estilo) */
#search-2.widget.widget_search button.btn.btn-default {
  background-color: #007C79 !important;  /* color Jetpack */
  color: #fff !important;
  border: none !important;
  border-radius: 25px !important;        /* bordes redondos */
  padding: 10px 26px !important;         /* tamaño más discreto */
  width: auto !important;                /* elimina ancho completo */
  font-size: 14px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  transition: background 0.3s ease !important;
  display: inline-block !important;
}

/* Hover */
#search-2.widget.widget_search button.btn.btn-default:hover {
  background-color: #009f9c !important;
}
.widget.widget_search {
    padding: 25px 30px;
    background-color: #eaf6f8;
}

/* ===== FIX RESPONSIVE REAL ===== */
@media (max-width: 768px) {

  /* Arregla el desbordamiento impuesto por el tema Kale */
  .sidebar .widget_search,
  .sidebar-primary .widget_search,
  .widget-area .widget_search {
    width: 100% !important;   /* quita el calc(100% + 12px) */
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* Ajusta el padding del fondo para móviles */
  .widget.widget_search {
    padding: 15px 18px !important;
  }

  /* Asegura que el input no crezca más de la cuenta */
  #search-2.widget.widget_search input[type="search"] {
    width: 100% !important;
  }

  /* Centrado del botón */
  #search-2.widget.widget_search .form-actions {
    text-align: center !important;
  }
}

/* Reemplazar texto "Search" por "Buscar" */
#search-2.widget.widget_search button.btn.btn-default {
  font-size: 0 !important;  /* oculta el texto original */
}

#search-2.widget.widget_search button.btn.btn-default::after {
  content: "Buscar";
  font-size: 14px !important;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
}


/* ============================
   ÍNDICE AUTOMÁTICO - ACORDEÓN 
   ============================ */

.afectos-toc {
    background: #f1fbfd;
    border-left: 4px solid #008b94;
    padding: 18px 22px;
    margin: 40px 0 50px;
    border-radius: 12px;
    font-family: 'Lato', sans-serif;
}

/* Título clickable */
.afectos-toc-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #008b94;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Icono flecha */
.afectos-toc-title .toc-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

/* Lista inicialmente OCULTA */
.afectos-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.afectos-toc-list li {
    margin: 8px 0;
}

.afectos-toc-list a {
    color: #009fb2;
    font-weight: 600;
    text-decoration: none;
}

.afectos-toc-list a:hover {
    color: #ea96ca;
}

/* Subniveles (H3) */
.afectos-toc-list .subitem {
    margin-left: 18px;
    opacity: 0.85;
}

/* Cuando está abierto */
.afectos-toc.open .afectos-toc-list {
    max-height: 800px; /* suficiente para artículos largos */
}

.afectos-toc.open .toc-icon {
    transform: rotate(180deg);
}

@media(max-width: 600px){
    .afectos-toc-title {
        font-size: 1.2rem;
    }
}
 



/* ================================
   BOTÓN VOLVER ARRIBA 
   (ajustado para no pisar reCAPTCHA)
   ================================ */

#back-to-top {
    position: fixed;
    bottom: 110px; /* ← SUBIDO (antes 35px) */
    right: 18px;   /* ← MÁS A LA DERECHA (antes 30px pero dependía del layout) */
    background: #008b94;
    color: #fff;
    font-size: 20px;
    padding: 12px 14px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: #00a7b0;
}
/* === FIX Lighthouse: font-display para Font Awesome === */

/* ===============================
   TABLA COMPARATIVA – ESTILO BASE
   =============================== */

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 15px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

/* ENCABEZADO */
.entry-content table thead th {
  background: #004376;
  color: #ffffff;
  font-weight: 700;
  padding: 14px 16px;
  text-align: left;
}

/* CELDAS */
.entry-content table tbody td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid #eaeaea;
  line-height: 1.55;
}

/* PRIMERA COLUMNA (CARACTERÍSTICA) */
.entry-content table tbody td:first-child {
  font-weight: 600;
  color: #004376;
  background: #f2f6f7;
  width: 22%;
}

/* FILAS ALTERNAS */
.entry-content table tbody tr:nth-child(even) td {
  background: #fafafa;
}

.entry-content table tbody tr:nth-child(even) td:first-child {
  background: #eef3f4;
}

/* HOVER SUAVE */
.entry-content table tbody tr:hover td {
  background: #eef6f3;
}

/* ===============================
   VERSIÓN MÓVIL – TARJETAS
   =============================== */

@media (max-width: 768px) {

  /* Reset estructura de tabla */
  .entry-content table,
  .entry-content table thead,
  .entry-content table tbody,
  .entry-content table tr {
    display: block;
    width: 100%;
  }

  .entry-content table thead {
    display: none;
  }

  .entry-content table {
    box-shadow: none;
    border-radius: 0;
  }

  /* Cada fila como tarjeta */
  .entry-content table tbody tr {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 18px;
  }

  /* Título de la tarjeta (Característica) */
  .entry-content table tbody td:first-child {
    display: block;
    width: auto;
    max-width: 100%;
    background: none;
    padding: 0;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 16px;
    color: #004376;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }

  /* Bloques de comparación */
  .entry-content table tbody td:nth-child(2),
  .entry-content table tbody td:nth-child(3) {
    display: block;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
  }

  /* Etiqueta + bloque Avena en grano */
  .entry-content table tbody td:nth-child(2) {
    background: #eef6f3;
    border-left: 4px solid #9fcfc3;
  }

  .entry-content table tbody td:nth-child(2)::before {
    content: "Avena en grano";
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: #004376;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  /* Etiqueta + bloque Copos */
  .entry-content table tbody td:nth-child(3) {
    background: #f7f7f7;
    border-left: 4px solid #cccccc;
  }

  .entry-content table tbody td:nth-child(3)::before {
    content: "Copos de avena";
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: #666666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
