/* =============================================
   MH SINGLE POST — ESTILOS
   Ancho máximo: 1140px
   ============================================= */

/* VARIABLES */
:root {
    --mh-max-width: 1140px;
    --mh-hero-bg: #F8F8F8;
    --mh-accent: #F5536D;
    --mh-text: #1a1a2e;
    --mh-muted: #6b7280;
    --mh-border: #e5e7eb;
    --mh-toc-width: 220px;
    --mh-radius: 12px;
    --mh-font-body: 'Inter', serif;
    --mh-font-ui: 'Inter', Arial, sans-serif;
}

/* CONTENEDOR BASE */
.mh-container {
    max-width: var(--mh-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   HERO
   ============================================= */
.mh-hero {
    background: var(--mh-hero-bg);
    padding: 60px 0;
}

.mh-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.mh-hero-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mh-hero-date {
    font-family: var(--mh-font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mh-muted);
    margin: 0;
}

.mh-hero-title {
    font-family: var(--mh-font-ui);
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--mh-text);
    margin: 0;
}

.mh-hero-excerpt {
    font-family: var(--mh-font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--mh-muted);
    margin: 0;
}

/* Meta box */
.mh-hero-meta {
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: var(--mh-radius);
    background: rgba(255,255,255,0.6);
    overflow: hidden;
    margin-top: 8px;
}

.mh-meta-item {
    flex: 1;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mh-meta-divider {
    width: 1px;
    background: rgba(0,0,0,0.12);
}

.mh-meta-label {
    font-family: var(--mh-font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mh-muted);
}

.mh-meta-value {
    font-family: var(--mh-font-ui);
    font-size: 14px;
    font-weight: 500;
    color: var(--mh-text);
}

.mh-meta-value a {
    color: var(--mh-text);
    text-decoration: none;
}

/* Hero imagen */
.mh-hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mh-hero-right img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: var(--mh-radius);
    display: block;
}

/* =============================================
   BREADCRUMBS
   ============================================= */
.mh-breadcrumbs {
    border-bottom: 1px solid var(--mh-border);
    padding: 12px 0;
    background: #fff;
}

.mh-breadcrumbs #breadcrumbs {
    margin: 0;
    font-family: var(--mh-font-ui);
    font-size: 13px;
    color: var(--mh-muted);
}

.mh-breadcrumbs #breadcrumbs a {
    color: var(--mh-accent);
    text-decoration: none;
}

/* =============================================
   CONTENIDO + TOC
   ============================================= */
.mh-content-section {
    padding: 60px 0;
    background: #fff;
}

.mh-content-grid {
    display: grid;
    grid-template-columns: var(--mh-toc-width) 1fr;
    gap: 48px;
    align-items: start;
}

/* TOC */
.mh-toc {
    position: sticky;
    top: 80px;
    padding: 24px;
    border-left: 3px solid var(--mh-accent);
    background: #f8f9fb;
    border-radius: 0 var(--mh-radius) var(--mh-radius) 0;
}

.mh-toc h3 {
    font-family: var(--mh-font-ui);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mh-text);
    margin: 0 0 16px 0;
}

.mh-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mh-toc ul li a {
    font-family: var(--mh-font-ui);
    font-size: 13px;
    color: var(--mh-accent);
    text-decoration: none;
    line-height: 1.4;
    display: block;
    transition: opacity 0.2s;
}

.mh-toc ul li a:hover {
    opacity: 0.7;
}

/* Artículo */
.mh-article-content {
    font-family: var(--mh-font-body);
    font-size: 17px;
    line-height: 1.8;
    color: var(--mh-text);
}

.mh-article-content.mh-no-toc {
    grid-column: 1 / -1;
}

.mh-article-content h2 {
    font-family: var(--mh-font-ui);
    font-size: 26px;
    font-weight: 700;
    margin: 48px 0 16px;
    color: var(--mh-text);
}

.mh-article-content h3 {
    font-family: var(--mh-font-ui);
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 12px;
}

.mh-article-content p {
    margin: 0 0 24px;
}

.mh-article-content img {
    max-width: 100%;
    border-radius: var(--mh-radius);
    height: auto;
}

.mh-article-content a {
    color: var(--mh-accent);
}

/* =============================================
   SHARE + TAGS
   ============================================= */
.mh-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid var(--mh-border);
    border-bottom: 1px solid var(--mh-border);
    flex-wrap: wrap;
    gap: 16px;
}

.mh-share {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mh-font-ui);
    font-size: 14px;
    font-weight: 600;
    color: var(--mh-text);
}

.mh-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--mh-text);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.mh-share a:hover {
    background: var(--mh-accent);
    color: #fff;
}

.mh-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mh-tags a {
    font-family: var(--mh-font-ui);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid var(--mh-border);
    border-radius: 999px;
    color: var(--mh-text);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.mh-tags a:hover {
    border-color: var(--mh-accent);
    color: var(--mh-accent);
}

/* =============================================
   COMENTARIOS
   ============================================= */
.mh-comments-wrapper {
    margin-top: 48px;
    padding-top: 40px;
}

.mh-comments-wrapper .comment-respond,
.mh-comments-wrapper .comments-area {
    font-family: var(--mh-font-ui);
}

/* =============================================
   ÚLTIMOS BLOGS
   ============================================= */
.mh-related-posts {
    background: #f8f9fb;
    padding: 60px 0;
}

.mh-related-title {
    font-family: var(--mh-font-ui);
    font-size: 28px;
    font-weight: 800;
    color: var(--mh-accent);
    text-align: center;
    margin: 0 0 32px;
}

.mh-related-wrapper {
    overflow: hidden;
    position: relative;
}

.mh-related-grid {
    display: flex;
    gap: 24px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mh-related-card {
    min-width: calc((100% - 48px) / 3);
    flex-shrink: 0;
    background: #fff;
    border-radius: var(--mh-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}

.mh-related-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.mh-related-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mh-related-img img,
.mh-related-no-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.mh-related-no-img {
    background: var(--mh-hero-bg);
}

.mh-related-info {
    padding: 16px;
}

.mh-related-date {
    font-family: var(--mh-font-ui);
    font-size: 11px;
    color: var(--mh-muted);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mh-related-card h3 {
    font-family: var(--mh-font-ui);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--mh-text);
    margin: 0;
}

/* Flechas carrusel */
.mh-related-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.mh-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--mh-border);
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    color: var(--mh-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.mh-nav-btn:hover:not(:disabled) {
    background: var(--mh-accent);
    color: #fff;
    border-color: var(--mh-accent);
}

.mh-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* =============================================
   SIN TOC — contenido a ancho completo
   ============================================= */
.mh-content-grid {
    grid-template-columns: 1fr;
}

/* =============================================
   NAVEGACIÓN ANTERIOR / SIGUIENTE
   ============================================= */
.mh-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 40px 0;
    padding: 24px 0;
    border-top: 1px solid var(--mh-border);
    border-bottom: 1px solid var(--mh-border);
}

.mh-post-nav-item a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    padding: 16px;
    border-radius: var(--mh-radius);
    background: #f8f9fb;
    transition: background 0.2s;
}

.mh-post-nav-item a:hover {
    background: #eef2ff;
}

.mh-post-nav-next {
    text-align: right;
}

.mh-nav-label {
    font-family: var(--mh-font-ui);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mh-accent);
}

.mh-nav-title {
    font-family: var(--mh-font-ui);
    font-size: 14px;
    font-weight: 500;
    color: var(--mh-text);
    line-height: 1.4;
}

/* =============================================
   COMENTARIOS
   ============================================= */
.mh-comments-wrapper {
    margin-top: 48px;
}

.mh-comments-wrapper .comments-title,
.mh-comments-wrapper .comment-reply-title {
    font-family: var(--mh-font-ui);
    font-size: 22px;
    font-weight: 700;
    color: var(--mh-text);
    margin-bottom: 24px;
}

.mh-comments-wrapper .comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mh-comments-wrapper .comment-body {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    align-items: start;
    background: #f8f9fb;
    border-radius: var(--mh-radius);
    padding: 20px;
}

.mh-comments-wrapper .comment-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: block;
}

.mh-comments-wrapper .comment-author b {
    font-family: var(--mh-font-ui);
    font-size: 14px;
    font-weight: 600;
    color: var(--mh-text);
}

.mh-comments-wrapper .comment-author b a {
    color: inherit;
    text-decoration: none;
}

.mh-comments-wrapper .comment-metadata {
    font-family: var(--mh-font-ui);
    font-size: 12px;
    color: var(--mh-muted);
    margin: 4px 0 10px;
}

.mh-comments-wrapper .comment-metadata a {
    color: var(--mh-muted);
    text-decoration: none;
}

.mh-comments-wrapper .comment-content p {
    font-family: var(--mh-font-ui);
    font-size: 15px;
    line-height: 1.6;
    color: var(--mh-text);
    margin: 0;
}

.mh-comments-wrapper .reply a {
    font-family: var(--mh-font-ui);
    font-size: 12px;
    font-weight: 600;
    color: var(--mh-accent);
    text-decoration: none;
    margin-top: 8px;
    display: inline-block;
}

/* Formulario comentarios */
.mh-comments-wrapper .comment-form label {
    font-family: var(--mh-font-ui);
    font-size: 13px;
    font-weight: 600;
    color: var(--mh-text);
    display: block;
    margin-bottom: 6px;
}

.mh-comments-wrapper .comment-form input[type="text"],
.mh-comments-wrapper .comment-form input[type="email"],
.mh-comments-wrapper .comment-form input[type="url"],
.mh-comments-wrapper .comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--mh-border);
    border-radius: 8px;
    font-family: var(--mh-font-ui);
    font-size: 14px;
    color: var(--mh-text);
    background: #fff;
    transition: border-color 0.2s;
}
.mh-comments-wrapper .comment-form input:focus,
.mh-comments-wrapper .comment-form textarea:focus {
    outline: none;
    border-color: var(--mh-accent);
}

.mh-comments-wrapper .comment-form .form-submit input {
    background: var(--mh-accent);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: var(--mh-font-ui);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: auto;
    transition: opacity 0.2s;
}

.mh-comments-wrapper .comment-form .form-submit input:hover {
    opacity: 0.85;
}

@media (max-width: 600px) {
    .mh-post-nav {
        grid-template-columns: 1fr;
    }
    .mh-post-nav-next {
        text-align: left;
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .mh-hero-grid {
        grid-template-columns: 1fr;
    }
    .mh-hero-right {
        order: -1;
    }
    .mh-hero-right img {
        height: 260px;
    }
    .mh-content-grid {
        grid-template-columns: 1fr;
    }
    .mh-toc {
        position: static;
    }
    .mh-related-card {
        min-width: calc((100% - 24px) / 2);
    }
}

@media (max-width: 600px) {
    .mh-hero {
        padding: 40px 0;
    }
    .mh-hero-meta {
        flex-direction: column;
    }
    .mh-meta-divider {
        width: 100%;
        height: 1px;
    }
    .mh-related-card {
        min-width: 100%;
    }
    .mh-post-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}