/* Blog Hero */
.blog-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 140px 0 60px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
}

.blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 60%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 30%, rgba(14, 165, 233, 0.12) 0%, transparent 45%);
    pointer-events: none;
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

.blog-hero-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.blog-hero-title {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.blog-hero-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.blog-hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.blog-hero-cta {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.6rem;
    border-radius: 30px;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.15s;
}

.blog-hero-cta:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.blog-hero-cta-secondary {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #ffffff;
    color: var(--primary) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.6rem;
    border-radius: 30px;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.15s;
}

.blog-hero-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
}

.blog-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.blog-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.blog-hero-stat strong {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

.blog-hero-stat span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.blog-hero-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.18);
}

/* Override main padding when hero is present */
.blog-hero + main {
    padding-top: 0;
    scroll-margin-top: 80px;
}

/* Blog Listing */
.blog-posts-container {
    justify-content: space-between;
    gap: 30px 2.5%;
}

/* Phantom element to keep last row left-aligned when it has fewer than 3 cards */
.blog-posts-container::after {
    content: '';
    width: 31%;
}

/* Blog Post Preview Cards - okundata style (no images) */
.blog-post-preview {
    width: 31%;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-post-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    color: var(--primary);
}

/* Card meta: badge + date */
.blog-post--meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    gap: 0.5rem;
}

.blog-post--badge {
    display: inline-block;
    background-color: var(--secondary);
    color: #ffffff;
    padding: 0.15rem 0.7rem;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.blog-post--date {
    color: var(--gris);
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-bottom: 0;
}

/* Card title */
.blog-post-preview h2 {
    font-size: 22px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

/* Card description */
.blog-post-preview .blog-post--desc {
    color: var(--gris);
    font-size: 16px;
    line-height: 1.45;
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

/* Read link */
.blog-post--read {
    color: var(--secondary);
    font-size: 15px;
    font-weight: 500;
}

.blog-post-preview:hover .blog-post--read {
    text-decoration: underline;
}

/* Blog Post Page */
.blog-post-header {
    padding-bottom: 1.5rem;
}

.blog-post-header .blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0.6rem;
}

.blog-post-header h1 {
    font-size: 42px;
    font-weight: 400;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 16px;
    color: var(--gris);
    padding-bottom: 10px;
}

.blog-post-meta i {
    margin-right: 5px;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Blog Article Content */
#blog-contenido {
    width: 100%;
}

/* Spacing between blog content column and sidebar */
.blog-post-header,
#blog-contenido,
.blog-post-share,
#seguir-leyendo {
    padding-right: 24px;
}

#blog-contenido p a {
    color: var(--primary);
    font-weight: 400;
}

#blog-contenido p a:hover {
    color: var(--secondary);
}

#blog-contenido h2 {
    font-size: 28px;
    font-weight: 400;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

#blog-contenido h3 {
    font-size: 22px;
    font-weight: 500;
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
}

#blog-contenido ul li {
    font-size: 20px;
    line-height: 26px;
    font-weight: 300;
    padding-bottom: 5px;
}

#blog-contenido .dato-destacado {
    background-color: #f8f8f8;
    border-left: 4px solid var(--secondary);
    padding: 15px 20px;
    margin: 1.2rem 0;
    font-size: 18px;
}

#blog-contenido .dato-destacado strong {
    font-weight: 500;
}

#blog-contenido .fuente-datos {
    font-size: 15px;
    color: var(--gris);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Share Section */
.blog-post-share {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin: 2rem 0;
}

.blog-post-share .redes-sociales img {
    transition: transform 750ms ease;
}

.blog-post-share .redes-sociales:hover img {
    transform: scale(1.1);
}

/* Seguir Leyendo */
#seguir-leyendo {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

#seguir-leyendo > h2 {
    font-size: 26px;
    color: var(--secondary);
    margin-bottom: 1rem;
}

#seguir-leyendo .blog-posts-container {
    gap: 20px;
}

#seguir-leyendo .blog-post-preview {
    width: 48%;
    padding: 1.2rem;
}

#seguir-leyendo .blog-post-preview h2 {
    font-size: 18px;
}

#seguir-leyendo .blog-post-preview .blog-post--desc {
    font-size: 14px;
    line-height: 1.4;
}

/* Media Queries */
@media (max-width: 1400px) {
    .blog-post-preview h2 {
        font-size: 20px;
    }

    .blog-post-preview .blog-post--desc {
        font-size: 15px;
    }

    .blog-post-header h1 {
        font-size: 38px;
    }

    #blog-contenido h2 {
        font-size: 24px;
    }

    #blog-contenido ul li {
        font-size: 18px;
        line-height: 24px;
    }

    #seguir-leyendo .blog-post-preview h2 {
        font-size: 17px;
    }
}

@media (max-width: 1200px) {
    .blog-post-preview {
        width: 31%;
    }

    .blog-post-header h1 {
        font-size: 30px;
    }
}

@media (max-width: 992px) {
    .blog-post-preview {
        width: 48%;
    }

    #blog-contenido {
        padding-right: 0;
    }

    #seguir-leyendo .blog-post-preview {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .blog-post-preview {
        width: 100%;
    }

    .blog-post-meta {
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .blog-post-header h1 {
        font-size: 28px;
        text-align: center;
    }

    .blog-post-preview h2 {
        font-size: 18px;
    }

    #blog-contenido p {
        text-align: justify;
    }

    #blog-contenido h2 {
        font-size: 22px;
    }

    .blog-post-meta {
        font-size: 14px;
        justify-content: center;
    }

    .blog-post-tags {
        justify-content: center;
    }
}
