/* Blog Card Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.post-card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--light);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.post-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.post-card-title a {
    color: var(--text);
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex: 1;
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

/* Base Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 60px 0;
}

/* Sidebar */
.sidebar {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

.widget ul li a {
    color: var(--text);
}

.widget ul li a:hover {
    color: var(--primary);
}

/* YouTube Widget */
.widget_youtube_banner {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--primary);
}

.widget_youtube_banner a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

/* Single Post */
.single-post-hero {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    border-radius: 12px;
    margin-bottom: 40px;
    overflow: hidden;
    background-color: var(--dark);
}

.single-post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(13, 17, 23, 0.9));
}

.single-post-hero-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    width: 100%;
    color: var(--white);
}

.single-post-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--white);
}

.single-post-meta {
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.single-post-content {
    font-size: 1.1rem;
}

.single-post-content h2,
.single-post-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content img {
    border-radius: 8px;
    margin: 20px 0;
}

.single-post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    font-style: italic;
    color: var(--text-muted);
    background: var(--light);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 30px 0;
}

.youtube-cta {
    background: var(--primary);
    color: var(--white) !important;
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    margin: 40px 0;
    text-align: center;
    width: 100%;
}

.youtube-cta:hover {
    background: var(--accent);
    color: var(--white);
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--text);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

/* Category Filter */
.category-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cat-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.cat-filter-btn:hover,
.cat-filter-btn.active {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination .page-numbers {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .single-post-title {
        font-size: 2rem;
    }
}

/* ════════════════════════════════════════
   POST HERO
════════════════════════════════════════ */
.post-hero {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    background: var(--dark);
}

/* Con imagen destacada */
.post-hero__image-wrap {
    position: absolute;
    inset: 0;
}

.post-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(13, 17, 23, 0.3) 0%,
            rgba(13, 17, 23, 0.75) 100%);
}

/* Sin imagen: gradiente del logo */
.post-hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--dark) 0%, #0a2a4a 50%, #003d2e 100%);
}

.post-hero__gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(26, 115, 232, 0.2) 0%, transparent 60%),
        radial-gradient(circle at 70% 50%, rgba(0, 200, 150, 0.15) 0%, transparent 60%);
}

/* Badge de categoría sobre el hero */
.post-hero__badge-wrap {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 720px;
    padding: 0 20px;
}

.post-hero__badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ════════════════════════════════════════
   CONTENEDOR PRINCIPAL (estilo Medium)
════════════════════════════════════════ */
.post-main {
    background: var(--white);
    padding: 48px 20px 80px;
}

.post-container {
    max-width: 720px;
    margin: 0 auto;
}

/* ── Breadcrumb ── */
.post-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.post-breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
}

.post-breadcrumb a:hover {
    color: var(--primary);
}

.post-breadcrumb__sep {
    color: var(--text-muted);
}

.post-breadcrumb__current {
    color: var(--text-muted);
}

/* ── Meta ── */
.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.post-meta__dot {
    color: var(--border);
}

/* ── Título ── */
.post-title {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

/* ── Divisor con gradiente del logo ── */
.post-divider {
    height: 3px;
    border: none;
    border-radius: 999px;
    background: var(--gradient-ring);
    margin: 28px 0;
    width: 60px;
}

.post-divider--light {
    background: var(--border);
    width: 100%;
    height: 1px;
}

/* ════════════════════════════════════════
   CONTENIDO DEL POST (tipografía cómoda)
════════════════════════════════════════ */
.post-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text);
}

.post-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light);
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--secondary);
}

.post-content p {
    margin-bottom: 1.4rem;
}

.post-content a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover {
    color: var(--primary);
}

.post-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 1.5rem 0;
    display: block;
}

.post-content ul,
.post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.4rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Blockquote estilizado con color del logo */
.post-content blockquote {
    margin: 2rem 0;
    padding: 20px 24px;
    border-left: 4px solid var(--primary);
    background: rgba(0, 200, 150, 0.05);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Bloques de código con Prism.js */
.post-content pre {
    background: var(--dark-surface) !important;
    border: 1px solid rgba(0, 200, 150, 0.2);
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.88rem;
    line-height: 1.65;
}

.post-content code:not([class]) {
    background: rgba(26, 115, 232, 0.1);
    color: var(--secondary);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
}

/* ── Bloque YouTube CTA ── */
.post-youtube-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 12px;
    background: rgba(255, 0, 0, 0.04);
    border: 1.5px solid rgba(255, 0, 0, 0.2);
    margin: 2rem 0;
}

.post-youtube-cta__icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.post-youtube-cta__text {
    flex: 1;
}

.post-youtube-cta__text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
}

.post-youtube-cta__text span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.post-youtube-cta__btn {
    padding: 8px 18px;
    background: #FF0000;
    color: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.post-youtube-cta__btn:hover {
    background: #cc0000;
}

/* ── Tags ── */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1.5rem 0;
}

.post-tag {
    font-size: 0.8rem;
    color: var(--secondary);
    background: rgba(26, 115, 232, 0.08);
    padding: 4px 12px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid rgba(26, 115, 232, 0.2);
    transition: background 0.2s, color 0.2s;
}

.post-tag:hover {
    background: var(--secondary);
    color: var(--white);
}

/* ════════════════════════════════════════
   BLOQUE DE AUTOR
════════════════════════════════════════ */
.post-author-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 28px;
    border-radius: 16px;
    background: var(--light);
    border: 1.5px solid var(--border);
    margin: 2.5rem 0;
}

@media (max-width: 540px) {
    .post-author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.post-author-card__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.post-author-card__avatar {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Anillo decorativo que imita el logo */
.post-author-card__ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient-ring);
    z-index: -1;
}

.post-author-card__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.post-author-card__name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    display: block;
    margin: 2px 0 8px;
}

.post-author-card__bio {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 14px;
}

.post-author-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-author-card__link {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.post-author-card__link:hover {
    opacity: 0.8;
}

.post-author-card__link--linkedin {
    background: #0A66C2;
    color: #fff;
}

.post-author-card__link--youtube {
    background: #FF0000;
    color: #fff;
}

.post-author-card__link--contact {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

/* ── Navegación anterior/siguiente ── */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 2.5rem;
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--white);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.post-nav-link:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.post-nav-link--next {
    text-align: right;
}

.post-nav-link__dir {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.post-nav-link__title {
    font-size: 0.88rem;
    color: var(--text);
    font-weight: 700;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .post-navigation {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════════
   POSTS RELACIONADOS
════════════════════════════════════════ */
.related-posts {
    background: var(--light);
    padding: 60px 20px;
}

.related-posts .container {
    max-width: 1100px;
    margin: 0 auto;
}

.related-posts__title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.related-posts__title-line {
    flex: 1;
    height: 2px;
    border-radius: 999px;
    background: var(--gradient-ring);
    opacity: 0.4;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .related-posts__grid {
        grid-template-columns: 1fr;
    }
}

.related-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.related-card__image-wrap {
    display: block;
    height: 160px;
    overflow: hidden;
}

.related-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-card:hover .related-card__image {
    transform: scale(1.04);
}

.related-card__image-wrap--placeholder {
    background: var(--gradient-ring);
    opacity: 0.15;
}

.related-card__body {
    padding: 16px 18px;
}

.related-card__cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 6px 0 8px;
    line-height: 1.4;
}

.related-card__title a {
    color: var(--text);
    text-decoration: none;
}

.related-card__title a:hover {
    color: var(--secondary);
}

.related-card__date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ════════════════════════════════════════
   COMENTARIOS REDISEÑADOS
════════════════════════════════════════ */
.post-comments {
    background: var(--white);
    padding: 40px 20px 80px;
}

.post-comments__inner {
    max-width: 720px;
    margin: 0 auto;
}

/* Título de comentarios */
.post-comments #comments .comments-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--light);
}

/* Lista de comentarios */
.post-comments .comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}

.post-comments .comment {
    padding: 20px;
    border-radius: 10px;
    background: var(--light);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.post-comments .comment-author .fn {
    font-weight: 700;
    color: var(--secondary);
}

.post-comments .comment-metadata {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.post-comments .comment-body p {
    font-size: 0.92rem;
    margin-top: 10px;
    color: var(--text);
}

.post-comments .reply a {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

/* Formulario de comentarios */
.post-comments #respond {
    margin-top: 32px;
}

.post-comments #reply-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.post-comments .comment-form-comment textarea,
.post-comments .comment-form input[type="text"],
.post-comments .comment-form input[type="email"],
.post-comments .comment-form input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--white);
    font-size: 0.92rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.post-comments .comment-form input:focus,
.post-comments .comment-form-comment textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.12);
}

.post-comments #submit {
    background: var(--gradient-ring);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.post-comments #submit:hover {
    opacity: 0.85;
}

/* ════════════════════════════════════════
   HOME BLOG
════════════════════════════════════════ */
.blog-listing__hero {
    background: var(--dark);
    padding: 60px 0 48px;
    text-align: center;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(26, 115, 232, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 200, 150, 0.10) 0%, transparent 50%);
}

.blog-listing__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--white);
}

.blog-listing__subtitle {
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    font-size: 0.95rem;
}

.blog-listing__body {
    padding: 48px 20px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Paginación */
.blog-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.blog-pagination .nav-links {
    display: flex;
    gap: 8px;
}

.blog-pagination .page-numbers {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
    background: var(--gradient-ring);
    color: var(--white);
    border-color: transparent;
}