/* =========================================================
   PROYECTO DETAIL PAGE — Artículo + sidebar (autor / TOC /
   relacionados) + Buy Box. 100% basado en tokens de theme.css.
   ========================================================= */

.proyecto-detail-page {
    background: var(--bg-page) !important;
    color: var(--text-primary);
}

.proyecto-detail-main {
    padding: 90px 0 60px;
    position: relative;
    z-index: 1;
}

/* =========================================================
   FONDO DECORATIVO
   ========================================================= */
.proyecto-detail-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.bg-dot-1 { width: 14px; height: 14px; background: var(--brand-500);     top: 12%; left: 6%;  opacity: 0.40; }
.bg-dot-2 { width: 10px; height: 10px; background: var(--accent-purple); top: 18%; left: 14%; opacity: 0.40; }
.bg-dot-3 { width: 12px; height: 12px; background: var(--accent-coral);  top: 28%; left: 4%;  opacity: 0.35; }
.bg-dot-4 { width: 8px;  height: 8px;  background: var(--brand-500);     top: 50%; right: 4%; opacity: 0.50; }
.bg-dot-5 { width: 10px; height: 10px; background: var(--accent-purple); top: 70%; left: 8%;  opacity: 0.40; }
.bg-dot-6 { width: 12px; height: 12px; background: var(--brand-500);     top: 80%; right: 7%; opacity: 0.35; }

/* =========================================================
   LAYOUT
   ========================================================= */
.proyecto-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

/* =========================================================
   ARTÍCULO PRINCIPAL
   ========================================================= */
.proyecto-detail-article {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 36px 44px 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
    min-width: 0;
}

.proyecto-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-brand) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    margin-bottom: 20px;
    transition: gap var(--t-fast), color var(--t-fast);
}

.proyecto-back-link:hover {
    color: var(--brand-600) !important;
    gap: 10px;
    text-decoration: none !important;
}

.proyecto-detail-tag {
    display: inline-block;
    background: var(--bg-brand-soft);
    color: var(--text-brand-strong);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* Cabecera */
.proyecto-detail-header {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    margin-bottom: 28px;
}

.proyecto-detail-title {
    color: var(--text-primary) !important;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.18;
    margin: 0 0 18px;
    opacity: 1 !important;
    border: none !important;
    padding: 0 !important;
}

.proyecto-detail-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 13.5px;
}

.proyecto-detail-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

.proyecto-detail-meta .meta-item i {
    color: var(--text-muted);
    font-size: 13px;
}

.proyecto-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--btn-ghost-bg);
    border: none;
    color: var(--btn-ghost-text);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    transition: background var(--t-fast), color var(--t-fast);
    font-family: inherit;
}

.proyecto-save-btn:hover {
    background: var(--btn-ghost-bg-hover);
    color: var(--btn-ghost-text-hover);
}

.proyecto-save-btn.is-saved {
    color: var(--text-brand);
}

.proyecto-save-btn.is-saved i.fa-bookmark-o::before {
    content: "\f02e";
}

.proyecto-detail-header-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: linear-gradient(135deg, #0c4a6e, #0f172a);
    box-shadow: var(--shadow-md);
}

.proyecto-detail-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* CTA "Ver demostración" */
.proyecto-demo-cta {
    margin: 8px 0 28px;
    text-align: center;
}

.proyecto-demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-400) 100%);
    color: var(--text-inverse) !important;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: var(--shadow-brand);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.proyecto-demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(11, 206, 175, 0.45);
    color: var(--text-inverse) !important;
    text-decoration: none !important;
}

/* Resumen / callout */
.proyecto-summary {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: linear-gradient(135deg, var(--brand-50) 0%, var(--brand-100) 100%);
    border: 1px solid var(--border-brand);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 36px;
}

.proyecto-summary-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand-500);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.proyecto-summary-content h3 {
    color: var(--text-primary) !important;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    opacity: 1 !important;
}

.proyecto-summary-content p {
    color: var(--text-secondary) !important;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    opacity: 1 !important;
}

/* =========================================================
   SECCIONES DEL ARTÍCULO
   ========================================================= */
.proyecto-section {
    margin-bottom: 36px;
    scroll-margin-top: 100px;
}

.proyecto-section h2 {
    color: var(--text-primary) !important;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 14px;
    opacity: 1 !important;
    border: none !important;
    padding: 0 !important;
}

.proyecto-section h2 .num {
    color: var(--text-primary);
    margin-right: 4px;
}

.proyecto-section p {
    color: var(--text-secondary) !important;
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 14px;
    opacity: 1 !important;
}

.proyecto-section .proyecto-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.proyecto-section .proyecto-list li {
    position: relative;
    padding: 6px 0 6px 26px;
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.55;
}

.proyecto-section .proyecto-list li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-500);
}

.proyecto-section code {
    background: var(--bg-muted);
    color: var(--text-brand-strong);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    font-size: 0.9em;
    font-family: "SF Mono", Consolas, Monaco, monospace;
}

.proyecto-quote {
    border-left: 4px solid var(--brand-500);
    background: var(--bg-elevated-2);
    padding: 14px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 18px 0;
    color: var(--text-primary);
    font-size: 15.5px;
    font-style: italic;
    line-height: 1.6;
}

/* Diagrama de arquitectura */
.proyecto-arch-diagram {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
    background: var(--bg-elevated-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px 16px;
    margin: 18px 0;
}

.arch-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    min-width: 92px;
}

.arch-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
}

.arch-icon-green  { background: linear-gradient(135deg, #10b981, #059669); }
.arch-icon-purple { background: linear-gradient(135deg, var(--accent-purple), #6d28d9); }
.arch-icon-pink   { background: linear-gradient(135deg, var(--accent-pink), #be185d); }
.arch-icon-blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.arch-icon-orange { background: linear-gradient(135deg, var(--accent-orange), #c2410c); }

.arch-name {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.3;
}

.arch-name strong {
    font-weight: 600;
}

.arch-name small {
    color: var(--text-muted);
    font-size: 11px;
}

.arch-arrow {
    color: var(--text-disabled);
    font-size: 18px;
}

/* =========================================================
   FEEDBACK (Me gusta + Compartir)
   ========================================================= */
.proyecto-feedback {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px 0 4px;
    margin-top: 30px;
    border-top: 1px solid var(--border-subtle);
}

.proyecto-feedback-text h3 {
    color: var(--text-primary) !important;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    opacity: 1 !important;
}

.proyecto-feedback-text p {
    color: var(--text-muted) !important;
    font-size: 13.5px;
    margin: 0;
    opacity: 1 !important;
}

.proyecto-feedback-actions {
    display: flex;
    gap: 10px;
}

.proyecto-like-btn,
.proyecto-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast),
                border-color var(--t-fast), transform var(--t-fast);
    font-family: inherit;
}

.proyecto-like-btn {
    background: var(--btn-secondary-bg);
    border: 1.5px solid var(--btn-secondary-border);
    color: var(--btn-secondary-text);
}

.proyecto-like-btn:hover,
.proyecto-like-btn.is-liked {
    background: var(--btn-secondary-bg-hover);
    border-color: var(--btn-secondary-border-hover);
    color: var(--btn-secondary-text-hover);
}

.proyecto-like-btn.is-liked i.fa-heart-o::before {
    content: "\f004";
}

.proyecto-share-btn {
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-default);
    color: var(--text-secondary);
}

.proyecto-share-btn:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.proyecto-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px 22px;
    box-shadow: var(--shadow-sm);
}

.sidebar-card-title {
    color: var(--text-primary) !important;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 16px;
    opacity: 1 !important;
}

/* =========================================================
   BUY BOX
   ========================================================= */
.buy-box {
    border: 1px solid var(--border-default);
}

.buy-box-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.buy-box-label {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
}

.buy-box-price {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.buy-box-currency {
    color: var(--text-muted) !important;
    font-size: 12.5px;
    margin: 0 0 18px;
    opacity: 1 !important;
}

.buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--btn-buy-bg);
    color: var(--btn-buy-text) !important;
    padding: 14px 20px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
    box-shadow: var(--btn-buy-shadow);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.buy-btn:hover {
    background: var(--btn-buy-bg-hover);
    color: var(--btn-buy-text) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(22, 163, 74, 0.45);
    text-decoration: none !important;
}

.buy-btn:active {
    background: var(--btn-buy-bg-active);
    transform: translateY(0);
}

.buy-btn[disabled],
.buy-btn.is-disabled {
    background: var(--btn-buy-bg-disabled);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.buy-btn i {
    font-size: 16px;
}

.buy-box-divider {
    height: 1px;
    background: var(--border-default);
    margin: 22px 0 16px;
}

.buy-box-section {
    margin-bottom: 18px;
}

.buy-box-section:last-of-type {
    margin-bottom: 12px;
}

.buy-box-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary) !important;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
    opacity: 1 !important;
}

.buy-box-section-title i {
    color: var(--color-info);
    font-size: 14px;
}

.buy-box-section-title i.fa-times-circle {
    color: var(--color-danger);
}

.buy-box-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.buy-box-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
}

.buy-box-list .check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-success);
    color: var(--text-inverse);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
    margin-top: 2px;
}

.buy-box-list .cross {
    width: 18px;
    height: 18px;
    color: var(--color-danger);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 1px;
}

.buy-box-list-no li {
    color: var(--text-muted);
}

.buy-box-note {
    background: var(--color-warning-soft);
    border: 1px solid var(--color-warning-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--color-warning-text);
    font-size: 12.5px;
    line-height: 1.5;
    margin-top: 14px;
}

.buy-box-note strong {
    color: var(--color-warning-text);
}

/* =========================================================
   AUTHOR CARD
   ========================================================= */
.author-card {
    text-align: center;
}

.author-card .sidebar-card-title {
    text-align: left;
}

.author-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 14px;
    border: 3px solid var(--border-brand);
    background: var(--bg-muted);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-name {
    color: var(--text-primary) !important;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    opacity: 1 !important;
}

.author-role {
    color: var(--text-muted) !important;
    font-size: 13px;
    margin: 0 0 12px;
    opacity: 1 !important;
}

.author-desc {
    color: var(--text-secondary) !important;
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0 0 16px;
    opacity: 1 !important;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.author-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-muted);
    color: var(--brand-500) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none !important;
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.author-social a:hover {
    background: var(--brand-500);
    color: var(--text-inverse) !important;
    transform: translateY(-2px);
    text-decoration: none !important;
}

/* =========================================================
   TABLE OF CONTENTS
   ========================================================= */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-list li {
    margin: 0;
    padding: 0;
}

.toc-link {
    display: block;
    padding: 7px 12px;
    color: var(--text-muted) !important;
    font-size: 13.5px;
    line-height: 1.4;
    text-decoration: none !important;
    border-left: 2px solid transparent;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.toc-link:hover {
    color: var(--text-primary) !important;
    background: var(--bg-muted);
    text-decoration: none !important;
}

.toc-link.active {
    color: var(--text-brand) !important;
    border-left-color: var(--brand-500);
    background: var(--bg-brand-softer);
    font-weight: 600;
}

/* =========================================================
   ARTÍCULOS RELACIONADOS
   ========================================================= */
.related-item {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none !important;
    padding: 8px 0;
    border-radius: var(--radius-sm);
}

.related-item + .related-item {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.related-item:hover {
    text-decoration: none !important;
}

.related-item:hover .related-info h6 {
    color: var(--text-brand) !important;
}

.related-img {
    width: 80px;
    height: 64px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.related-img i {
    color: rgba(255, 255, 255, 0.45);
    font-size: 24px;
}

.related-img[data-pattern="data"] { background: linear-gradient(135deg, #0c4a6e, #0f172a); }
.related-img[data-pattern="ml"]   { background: linear-gradient(135deg, #064e3b, #0f172a); }
.related-img[data-pattern="bi"]   { background: linear-gradient(135deg, #1e1b4b, #0f172a); }
.related-img[data-pattern="ai"]   { background: linear-gradient(135deg, #581c87, #1e1b4b); }
.related-img[data-pattern="code"] { background: linear-gradient(135deg, #0f172a, #1e293b); }
.related-img[data-pattern="viz"]  { background: linear-gradient(135deg, #065f46, #134e4a); }

.related-info {
    flex: 1;
    min-width: 0;
}

.related-info h6 {
    color: var(--text-primary) !important;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px;
    opacity: 1 !important;
    transition: color var(--t-fast);
}

.related-tag {
    display: inline-block;
    background: var(--bg-brand-soft);
    color: var(--text-brand-strong);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    margin-right: 8px;
}

.related-date {
    color: var(--text-muted);
    font-size: 11.5px;
}

/* =========================================================
   FOOTER VIEJO
   ========================================================= */
.proyecto-detail-page .mh-footer-3 {
    position: relative;
    z-index: 1;
    margin-top: 40px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media only screen and (max-width: 1100px) {
    .proyecto-detail-layout {
        grid-template-columns: 1fr;
    }

    .proyecto-detail-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .proyecto-detail-sidebar .sidebar-card {
        flex: 1 1 280px;
    }

    .proyecto-detail-article {
        padding: 30px 32px 36px;
    }
}

@media only screen and (max-width: 768px) {
    .proyecto-detail-main {
        padding: 80px 0 40px;
    }

    .proyecto-detail-article {
        padding: 24px 22px 28px;
        border-radius: var(--radius-md);
    }

    .proyecto-detail-header {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .proyecto-detail-header-image {
        order: -1;
        aspect-ratio: 16 / 10;
    }

    .proyecto-detail-title {
        font-size: 26px;
    }

    .proyecto-detail-meta {
        gap: 12px;
        font-size: 13px;
    }

    .proyecto-summary {
        flex-direction: row;
        padding: 14px 16px;
    }

    .proyecto-summary-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .proyecto-section h2 {
        font-size: 20px;
    }

    .proyecto-section p {
        font-size: 14.5px;
    }

    .proyecto-arch-diagram {
        flex-direction: column;
        padding: 18px 12px;
    }

    .arch-arrow {
        transform: rotate(90deg);
    }

    .proyecto-feedback {
        flex-direction: column;
        align-items: flex-start;
    }

    .proyecto-feedback-actions {
        width: 100%;
    }

    .proyecto-like-btn,
    .proyecto-share-btn {
        flex: 1;
        justify-content: center;
    }

    .proyecto-detail-sidebar {
        flex-direction: column;
    }

    .author-avatar {
        width: 80px;
        height: 80px;
    }
}

@media only screen and (max-width: 480px) {
    .proyecto-detail-article {
        padding: 20px 16px 24px;
    }

    .proyecto-detail-title {
        font-size: 22px;
    }

    .buy-box-price {
        font-size: 20px;
    }
}

/* =========================================================
   HEADER — Fondo y colores para la página de detalle
   ========================================================= */

.proyecto-detail-page .mh-header {
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
}

.proyecto-detail-page .mh-header.nav-strict {
    background: var(--nav-bg-scroll);
    box-shadow: 0 2px 16px rgba(0,0,0,.15);
}

.proyecto-detail-page .mh-header .navbar-nav li a {
    color: var(--nav-text) !important;
    opacity: 1 !important;
}

.proyecto-detail-page .mh-header .navbar-nav li a:hover {
    color: var(--nav-text-hover) !important;
}

.proyecto-detail-page .mh-header .navbar-nav li.active a {
    color: var(--nav-text-active) !important;
    border-color: var(--nav-text-active) !important;
}

.proyecto-detail-page .navbar-toggler .icon,
.proyecto-detail-page .navbar-toggler .icon::before,
.proyecto-detail-page .navbar-toggler .icon::after {
    background-color: var(--nav-text) !important;
}

/* =========================================================
   CONTENIDO ENRIQUECIDO — salida del editor Quill
   ========================================================= */
.proyecto-contenido {
    color: var(--text-secondary);
    line-height: 1.85;
    font-size: .95rem;
}
.proyecto-contenido > *:first-child { margin-top: 0; }
.proyecto-contenido > *:last-child  { margin-bottom: 0; }

.proyecto-contenido p { margin-bottom: 1rem; }

.proyecto-contenido h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 .7rem;
}
.proyecto-contenido h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brand-500);
    padding-left: 12px;
    border-left: 3px solid var(--brand-500);
    margin: 1.8rem 0 .6rem;
}
.proyecto-contenido h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 .5rem;
}

.proyecto-contenido ul,
.proyecto-contenido ol {
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}
.proyecto-contenido li              { margin-bottom: .4rem; }
.proyecto-contenido ul li::marker   { color: var(--brand-500); }
.proyecto-contenido ol li::marker   { color: var(--brand-500); font-weight: 600; }

.proyecto-contenido blockquote {
    border-left: 4px solid var(--brand-500);
    background: rgba(11,206,175,.06);
    margin: 1.5rem 0;
    padding: .9rem 1.2rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-muted);
}

.proyecto-contenido img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    display: block;
}

.proyecto-contenido a {
    color: var(--brand-500);
    text-decoration: none;
}
.proyecto-contenido a:hover { text-decoration: underline; }

.proyecto-contenido strong { color: var(--text-primary); font-weight: 600; }
.proyecto-contenido em     { color: var(--text-muted); }

.proyecto-contenido code {
    background: rgba(11,206,175,.1);
    color: var(--brand-500);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: .87em;
    font-family: monospace;
}

/* ── Tablas en contenido enriquecido ─────────────────── */
.proyecto-contenido .table-responsive-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
}
.proyecto-contenido table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    min-width: 400px;
    margin: 0;
}
.proyecto-contenido th,
.proyecto-contenido td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-subtle);
}
.proyecto-contenido th {
    background: var(--bg-brand-softer);
    color: var(--text-brand-strong);
    font-weight: 600;
    font-size: .82rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-brand);
    white-space: nowrap;
}
.proyecto-contenido td {
    color: var(--text-secondary);
}
.proyecto-contenido tr:last-child td { border-bottom: none; }
.proyecto-contenido tbody tr:nth-child(even) td {
    background: var(--bg-elevated-2);
}
.proyecto-contenido tbody tr:hover td {
    background: var(--bg-brand-softer);
    transition: background .12s;
}

/* TOC — subtítulos (H3) indentados */
.toc-list .toc-sub {
    padding-left: 1rem;
    font-size: .82rem;
    opacity: .85;
}
.toc-list .toc-sub.active { opacity: 1; }

/* =========================================================
   PRICE CARD — sidebar card para proyectos de pago
   ========================================================= */
.price-card {
    padding: 0 0 20px !important;
    overflow: hidden;
    border-color: rgba(251,191,36,.35) !important;
}

.price-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(251,191,36,.14) 0%, rgba(245,158,11,.05) 100%);
    border-bottom: 1px solid rgba(251,191,36,.18);
}

.price-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #d97706;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.price-card-discount {
    background: #fbbf24;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
}

.price-card-price-block {
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(251,191,36,.14);
}

.price-card-original {
    color: var(--text-muted);
    font-size: .83rem;
    text-decoration: line-through;
    margin-bottom: 3px;
}

.price-card-amount {
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: #f59e0b;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 3px;
}

.price-card-symbol {
    font-size: 1.35rem;
    font-weight: 700;
}

.price-card .buy-box-currency { margin: 0; font-size: .72rem; }

.price-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 16px 20px 0;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a !important;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(251,191,36,.35);
    border-radius: var(--radius-pill);
    padding: 13px 20px;
    font-size: 14.5px;
    text-decoration: none !important;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.price-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(251,191,36,.5);
    color: #0f172a !important;
    text-decoration: none !important;
}

.price-card .buy-box-divider { margin: 16px 0 0; }

.price-card .buy-box-section {
    padding: 14px 20px 0;
    margin-bottom: 0;
}

.price-card .buy-box-section-title { margin-bottom: 10px; }

.price-card .buy-box-note { margin: 12px 20px 0; }
