/*
Theme Name: Kadence Child
Template: kadence
*/

/* ===== CABECERA NEGRA ===== */
#masthead .site-header-inner-wrap,
.kadence-sticky-header {
    background: #1a1a1a !important;
}

/* ===== PÁGINAS DE CATEGORÍA ===== */
.post-archive-hero-section {
    background: #1a1a1a !important;
    padding: 40px 20px !important;
    text-align: center !important;
}

.post-archive-hero-section h1,
.post-archive-hero-section .archive-title,
.post-archive-hero-section .page-title {
    color: #ffffff !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.post-archive-hero-section .entry-header {
    text-align: center !important;
}

/* ===== TARJETAS DE CATEGORÍA ===== */
.loop-entry.content-bg {
    background: #ffffff !important;
    border: 1px solid #e5e4e0 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.loop-entry.content-bg:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08) !important;
    border-color: #4ade80 !important;
}

.loop-entry .entry-title {
    display: block !important;
    margin-bottom: 10px !important;
}

.loop-entry .entry-title a {
    color: #1a1a1a !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.loop-entry .entry-title a:hover {
    color: #166534 !important;
}

.loop-entry .entry-summary {
    font-size: 13px !important;
    color: #666 !important;
    line-height: 1.6 !important;
    margin-bottom: 12px !important;
}

.loop-entry .post-more-link {
    background: #f59e0b !important;
    color: #1a1a1a !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    display: inline-block !important;
    margin-top: 10px !important;
}

.loop-entry .post-more-link:hover {
    background: #d97706 !important;
}

/* ===== ESPACIO BLANCO ENTRE CABECERA Y HERO ===== */
.home .entry-content > .wp-block-cover:first-child {
    margin-top: 0 !important;
}

.content-style-boxed .site-main > .entry-content-wrap {
    padding: 0 !important;
}

/* Eliminar raya blanca */
.home .site-main,
.home #primary,
.home .content-area,
.home .content-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.home .entry-content-wrap {
    padding-top: 0 !important;
}

/* Forzar fondo negro en hero de categoría */
.category .entry-hero,
.archive .entry-hero,
.category .post-archive-hero-section,
.archive .post-archive-hero-section {
    background: #1a1a1a !important;
}

.category .archive-title,
.archive .archive-title,
.category .page-title,
.archive .page-title {
    color: #ffffff !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    text-align: center !important;
    display: block !important;
}

.category .entry-hero .entry-header,
.archive .entry-hero .entry-header {
    text-align: center !important;
    padding: 40px 20px !important;
}

/* Eliminar raya blanca home */
.content-vertical-padding-show.home #primary {
    padding-top: 0 !important;
}
.content-vertical-padding-show.home .entry-content-wrap {
    padding-top: 0 !important;
}
.content-vertical-padding-show.home .wp-block-cover:first-child {
    margin-top: -2px !important;
}
.non-transparent-header.home #primary {
    padding-top: 0 !important;
}

/* Eliminar overlay blanco del hero */
.hero-section-overlay {
    display: none !important;
    opacity: 0 !important;
    background: transparent !important;
}

/* Eliminar sección hero vacía en home */
.home .page-hero-section {
    display: none !important;
}

/* Mostrar hero en categorías pero no en home */
.category .page-hero-section,
.archive .page-hero-section {
    display: block !important;
    background: #1a1a1a !important;
    padding: 40px 20px !important;
}

.category .page-hero-section *,
.archive .page-hero-section * {
    color: #ffffff !important;
}

.category .archive-title,
.archive .archive-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    text-align: center !important;
}

/* Eliminar raya blanca en categorías */
.category .page-hero-section,
.archive .page-hero-section {
    display: none !important;
}

/* Mostrar título en tarjetas de categoría */
.loop-entry .entry-title,
.loop-entry h2.entry-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

.loop-entry .entry-title a,
.loop-entry h2.entry-title a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    display: block !important;
    visibility: visible !important;
}

/* Ocultar hero original de categoría que estaba vacío */
.category .entry-hero.post-archive-hero-section,
.archive .entry-hero.post-archive-hero-section {
    display: none !important;
}

/* Forzar título visible en tarjetas - máxima especificidad */
ul#archive-container li.entry-list-item article .entry-content-wrap header.entry-header h2.entry-title,
ul#archive-container li.entry-list-item article .entry-content-wrap header.entry-header h2.entry-title a {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #1a1a1a !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    position: relative !important;
}

/* Fix definitivo título tarjetas */
article.loop-entry h2.entry-title a,
article.entry h2.entry-title a,
.loop-entry h2.entry-title a {
    color: #1a1a1a !important;
}

article.loop-entry,
article.entry.loop-entry {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

article.loop-entry * {
    color: #1a1a1a !important;
}

article.loop-entry a.post-more-link {
    color: #1a1a1a !important;
    background: #f59e0b !important;
}

/* TEST VISUAL */
h2.entry-title { border: 3px solid red !important; color: red !important; }
h2.entry-title a { color: red !important; }

/* Mostrar título en entradas individuales */
.single .entry-header .entry-title,
.single h1.entry-title {
    display: block !important;
    visibility: visible !important;
    color: #1a1a1a !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 16px !important;
}

/* Título en entradas individuales */
.single-post .entry-title,
.single-post h1.entry-title,
.postid-52 .entry-title {
    display: block !important;
    visibility: visible !important;
    color: #1a1a1a !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 16px !important;
}

/* Título h1 en entradas individuales */
.single-post h1.entry-title,
.single h1.entry-title {
    display: block !important;
    visibility: visible !important;
    color: #1a1a1a !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 20px 0 16px !important;
    opacity: 1 !important;
}

/* h1 título entrada individual - máxima especificidad */
body.single-post .entry-hero .entry-header h1.entry-title,
body.single .entry-hero .entry-header h1.entry-title,
body.single-post h1.entry-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #1a1a1a !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 0 16px !important;
    position: relative !important;
    clip: auto !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
}

/* Fix definitivo título entrada - ruta exacta */
.entry-content-wrap .entry-header.post-title h1.entry-title {
    display: block !important;
    color: #1a1a1a !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 16px !important;
}

/* Fix título entrada - fondo del hero oscuro */
.single-post .entry-hero.post-hero-section {
    background: #1a1a1a !important;
}

.single-post .entry-hero.post-hero-section h1.entry-title {
    color: #ffffff !important;
}

.single-post .entry-hero.post-hero-section .entry-taxonomies a,
.single-post .entry-hero.post-hero-section .entry-meta,
.single-post .entry-hero.post-hero-section time {
    color: #aaaaaa !important;
}

/* Tarjetas últimas guías más grandes */
.ar-ultimas-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 16px !important;
}

.ar-ultima-card {
    flex-direction: column !important;
    padding: 20px !important;
}

.ar-ultima-icon {
    width: 56px !important;
    height: 56px !important;
    font-size: 24px !important;
    margin-bottom: 10px !important;
}

.ar-ultima-titulo {
    font-size: 15px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
}

.ar-ultima-excerpt {
    font-size: 13px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Mejorar entradas individuales */
.single-post .entry-content-wrap {
    padding: 2rem 2.5rem !important;
}

.single-post .ar-producto-card {
    margin: 24px 0 !important;
}

/* SEO - mejorar legibilidad del contenido */
.single-post .entry-content p {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #333 !important;
    margin-bottom: 16px !important;
}

.single-post .entry-content h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 32px 0 16px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #4ade80 !important;
}

.single-post .entry-content h3 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 24px 0 12px !important;
}

/* Tiempo de lectura estimado */
.entry-meta {
    font-size: 13px !important;
    color: #888 !important;
    margin-bottom: 20px !important;
}

/* Ocultar el título original de Kadence que queda duplicado */
.single-post .entry-hero .entry-header h1.entry-title,
.single-post .entry-content-wrap .entry-header h1.entry-title {
    display: none !important;
}

/* Mejorar tarjetas categoría con Kadence Blocks */
.loop-entry .entry-content-wrap {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.loop-entry .entry-header {
    order: 2 !important;
    padding: 0 16px !important;
}

.loop-entry .entry-title {
    display: block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 8px 0 !important;
    line-height: 1.4 !important;
}

.loop-entry .entry-title a {
    color: #1a1a1a !important;
    text-decoration: none !important;
}

.loop-entry .entry-title a:hover {
    color: #166534 !important;
}

.loop-entry .entry-image-link {
    order: 1 !important;
}

.loop-entry .entry-summary {
    order: 3 !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    color: #666 !important;
}

.loop-entry .entry-footer {
    order: 4 !important;
    padding: 0 16px 16px !important;
    margin-top: auto !important;
}

/* Mejorar menú */
.main-navigation .primary-menu-container > ul > li > a {
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    transition: all 0.2s !important;
}

.main-navigation .primary-menu-container > ul > li > a:hover {
    background: rgba(74, 222, 128, 0.15) !important;
    color: #4ade80 !important;
}

/* Separador entre items del menú */
.main-navigation .primary-menu-container > ul > li {
    margin: 0 2px !important;
}

/* Forzar título visible en tarjetas - fix definitivo */
.loop-entry .entry-content-wrap .entry-header h2.entry-title,
.loop-entry .entry-content-wrap header.entry-header h2.entry-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 8px 0 6px !important;
    line-height: 1.4 !important;
    display: block !important;
    visibility: visible !important;
}

.loop-entry .entry-content-wrap .entry-header h2.entry-title a,
.loop-entry .entry-content-wrap header.entry-header h2.entry-title a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

.loop-entry .entry-content-wrap .entry-header h2.entry-title a:hover {
    color: #166634 !important;
}

/* Imagen más pequeña y bonita */
.loop-entry .entry-image-link img {
    height: 180px !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 8px 8px 0 0 !important;
}

/* Padding interior de la tarjeta */
.loop-entry .entry-content-wrap {
    padding: 12px !important;
}
