/*
   Danilion — Blog, archivos, búsqueda y 404
   Se carga en: is_home, is_archive, is_search, is_singular('post'), is_404
*/

/* ============ 0. UTILIDAD DE ACCESIBILIDAD ============ */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%);
    white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
    position: static !important;
    width: auto; height: auto;
    clip-path: none; margin: 0;
}

/* ============ 1. CABECERA DE BLOG Y ARCHIVOS ============ */
.blog-header .page-title {
    font-size: clamp(2.2rem, 7vw, 4rem);
    line-height: 1;
    overflow-wrap: break-word;
}
.page-eyebrow {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.archive-count {
    font-size: .85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 14px;
}
.archive-description,
.blog-header-intro {
    max-width: 680px;
    margin: 20px auto 0;
    color: #bbb;
    font-size: 1rem;
    line-height: 1.7;
    text-align: left;
}
.archive-description p,
.blog-header-intro p { color: inherit; font-size: inherit; margin-bottom: .9em; }
.archive-description p:last-child,
.blog-header-intro p:last-child { margin-bottom: 0; }
.archive-description a,
.blog-header-intro a {
    color: #ff6a3d; text-decoration: underline; text-underline-offset: 3px;
}
.blog-header-intro ul { list-style: disc; padding-left: 1.4em; margin-bottom: .9em; }
.blog-header-intro li::marker { color: var(--accent); }

/* ============ 2. BARRA DE FILTRO POR CATEGORÍA ============ */
.blog-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}
.blog-filter-item {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid #2a2a2a;
    background: #101010;
    color: #b9b9b9;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 30px;
    transition: all .25s ease;
}
.blog-filter-item:hover,
.blog-filter-item:focus-visible {
    border-color: var(--accent);
    color: #fff;
}
.blog-filter-item.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* ============ 3. TARJETAS ============ */
.blog-card {
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.blog-card-thumb { display: block; overflow: hidden; }
.blog-card-img { transition: transform .5s ease; }
.blog-card:hover .blog-card-img { transform: scale(1.05); }
.blog-content { display: flex; flex-direction: column; flex: 1; }
.blog-excerpt { flex: 1; }
.blog-read-more {
    align-self: flex-start;
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    letter-spacing: 1px;
    font-size: .85rem;
}
.blog-read-more:hover { color: var(--accent); }

/* ============ 4. CATEGORÍAS Y ETIQUETAS ============ */
.post-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.post-cat {
    display: inline-block;
    padding: 4px 11px;
    background: rgba(255, 51, 0, .12);
    border: 1px solid rgba(255, 51, 0, .45);
    color: #ff6a3d;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 3px;
    transition: all .25s ease;
}
.post-cat:hover,
.post-cat:focus-visible { background: var(--accent); border-color: var(--accent); color: #000; }

.single-entry-header .post-cats { justify-content: center; }

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    padding-top: 26px;
    border-top: 1px solid #222;
}
.post-tags-label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.post-tag {
    font-size: .85rem;
    color: #bbb;
    border-bottom: 1px solid transparent;
}
.post-tag:hover,
.post-tag:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }

/* ============ 5. PAGINACIÓN NUMERADA ============ */
.navigation.pagination { margin-top: 60px; }
.navigation.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;   /* objetivo táctil WCAG 2.5.5 */
    height: 44px;
    padding: 0 12px;
    border: 1px solid #222;
    background: #111;
    color: #bbb;
    font-weight: 700;
    font-size: .95rem;
    transition: all .25s ease;
}
.page-numbers:hover,
.page-numbers:focus-visible { border-color: var(--accent); color: #fff; }
.page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}
.page-numbers.dots { background: none; border-color: transparent; }

/* ============ 6. NAVEGACIÓN ENTRE ENTRADAS ============ */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 900px;
    margin: 60px auto 0;
}
.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
    background: #101010;
    border: 1px solid #222;
    border-radius: 4px;
    transition: all .25s ease;
}
.post-nav-item:hover { border-color: var(--accent); background: #141414; }
.post-nav-next { text-align: right; align-items: flex-end; }
.post-nav-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}
.post-nav-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.2;
    text-transform: uppercase;
    color: #fff;
}
.post-nav-next:only-child { grid-column: 2; }

/* ============ 7. BUSCADOR ============ */
.danilion-search {
    display: flex;
    gap: 0;
    max-width: 460px;
    margin: 0 auto;
}
.danilion-search-field {
    flex: 1;
    min-width: 0;
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-right: 0;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    padding: 13px 16px;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: border-color .25s;
}
.danilion-search-field::placeholder { color: #666; }
.danilion-search-field:focus { border-color: var(--accent); }
.danilion-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #000;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: all .25s ease;
}
.danilion-search-btn:hover { background: #fff; border-color: #fff; }
.danilion-search-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.blog-search { margin-top: 28px; }
.blog-empty-search { margin-top: 26px; }
.blog-empty { color: var(--text-muted); font-size: 1.1rem; }

/* ============ 8. ERROR 404 ============ */
.error-404-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
}
.e404-recent-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-bottom: 36px;
    color: #fff;
}

/* ============ 9. MÓVIL ============ */
@media (max-width: 700px) {
    .blog-header { padding: 100px 20px 32px; }
    .archive-description,
    .blog-header-intro { text-align: left; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav-next { text-align: left; align-items: flex-start; }
    .post-nav-next:only-child { grid-column: 1; }
    .post-tags { margin-top: 36px; }
}

/* ============ 10. TARJETA CON VIDEO ============ */
.blog-card-thumb { position: relative; }
.blog-card-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: rgba(255, 51, 0, .88);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
    transition: transform .3s ease, background .3s ease;
    pointer-events: none;
}
.blog-card-play svg { margin-left: 3px; }
.blog-card:hover .blog-card-play {
    transform: translate(-50%, -50%) scale(1.12);
    background: var(--accent);
}