/* =========================================
   BLOG (escaparate) — DPMagician
   ========================================= */

/* Hero Navigation (Sticky Years) */
.blog-nav-wrapper {
    margin-top: 30px;
    position: sticky;
    top: 80px;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    /* Fondo transparente, sin blur ni sombra */
    background: transparent;
}

.blog-years {
    display: inline-flex;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chip {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.chip:hover,
.chip:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Year Section Styling */
.year-section {
    margin-bottom: 80px;
    scroll-margin-top: 140px;
}

.year-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.year-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #fff;
    margin: 0;
    line-height: 1;
    font-style: italic;
    flex-shrink: 0;
}

.year-line {
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05));
    flex-grow: 1;
}

/* Blog Grid & Cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    display: block;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(79, 140, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Image/Video Thumb */
.blog-thumb {
    position: relative;
    width: 100%;
    /* Ratio fijo para que todas sean iguales */
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #050814;
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Recorta para llenar sin deformar */
    display: block;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-thumb img {
    transform: scale(1.05);
}

/* Badges */
.blog-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.badge-video {
    background: rgba(220, 20, 60, 0.85);
    color: white;
}

.badge-press {
    background: rgba(212, 175, 55, 0.85);
    color: black;
}

/* Play Icon Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
    opacity: 0.8;
    transition: all 0.3s;
}

.play-overlay svg {
    width: 20px;
    height: 20px;
    fill: white;
    margin-left: 2px;
}

.blog-card:hover .play-overlay {
    background: var(--accent);
    border-color: var(--accent);
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

/* Content */
.blog-meta {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: #fff;
}

.blog-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: auto;
}

/* =========================================
   SINGLE POST PAGE STYLING (CORRECCIÓN)
   ========================================= */

/* Aplica a los posts individuales si usas un layout distinto,
   o inyecta estilos si tus posts heredan styles.css + blog.css */

.post-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 140px;
    /* Separación extra del header */
    padding-bottom: 100px;
}

.post-header {
    text-align: center;
    margin-bottom: 50px;
}

.post-title-main {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-date-main {
    display: inline-block;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(79, 140, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.post-image-full {
    width: 100%;
    height: auto;
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 600px) {
    .year-header {
        flex-direction: row;
        gap: 15px;
    }

    .year-title {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-nav-wrapper {
        top: 70px;
    }
}

/* =========================================
   POST NAVIGATION
   ========================================= */

.post-navigation {
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 60px;
}

.post-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    /* Mismo ancho que el contenido del post */
    margin: 0 auto;
    gap: 20px;
    width: 100%;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Estilos específicos de botones para la nav */
.nav-btn.prev,
.nav-btn.next {
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn.prev:hover,
.nav-btn.next:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-btn.back {
    color: var(--accent);
    background: rgba(79, 140, 255, 0.1);
    border: 1px solid rgba(79, 140, 255, 0.2);
    font-weight: 600;
}

.nav-btn.back:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 140, 255, 0.2);
}

/* Filler para cuando no hay post anterior/siguiente y mantener centro */
.nav-spacer {
    width: 110px;
    /* Aprox ancho del botón */
    visibility: hidden;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 600px) {
    .post-nav-container {
        display: flex;
        justify-content: center;
        gap: 8px;
        padding: 0 10px;
        flex-wrap: nowrap;
    }

    .nav-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
        /* Más pequeño para caber */
        width: 100%;
    }

    .nav-btn.prev {
        justify-self: start;
        text-align: left;
    }

    .nav-btn.next {
        justify-self: end;
        text-align: right;
    }

    /* Ocultar texto "Anterior/Siguiente" si es necesario */
    .nav-text-long {
        display: none;
    }

    /* Mostrar versión corta o iconos */
    .nav-icon-only {
        font-size: 1rem;
    }
}

/* En escritorio ocultamos la versión corta de texto si queremos */
@media (min-width: 601px) {
    .nav-text-short {
        display: none;
    }

    .nav-text-long {
        display: inline;
    }
}

@media (max-width: 600px) {
    .nav-text-long {
        display: none;
    }

    .nav-text-short {
        display: inline;
    }

    .nav-btn {
        border-radius: 12px;
    }

    .nav-spacer {
        display: none;
    }
}