/* ============================================================
   GRUPO ENERGY — SINGLE POST STYLE  |  articulo.css
   Paleta: ABYSS (#02171C) · BRAND (#4CB79B) · GOLD (#BF935E)
   ============================================================ */

:root {
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --article-max-width: 820px;
}

/* ── BREADCRUMBS ─────────────────────────────────────────── */
.post-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text3);
    font-weight: 500;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-breadcrumbs a {
    color: var(--text2);
    transition: color 0.2s ease;
}

.post-breadcrumbs a:hover {
    color: var(--brand);
}

.post-breadcrumbs span.separator {
    color: rgba(74, 114, 127, 0.4);
    font-size: 0.65rem;
}

.post-breadcrumbs span.current {
    color: var(--text3);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* ── HERO DE ARTÍCULO ────────────────────────────────────── */
.post-hero {
    padding: 7rem 0 3.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.post-hero__inner {
    max-width: var(--article-max-width);
    margin: 0 auto;
}

.post-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.post-hero__category {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand);
    background: rgba(76, 183, 155, 0.1);
    border: 1px solid rgba(76, 183, 155, 0.25);
    padding: 0.25rem 0.8rem;
    border-radius: 9999px;
}

.post-hero__date,
.post-hero__author {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text3);
    font-weight: 500;
}

.post-hero__date i,
.post-hero__author i {
    color: var(--brand);
    font-size: 0.75rem;
}

.post-hero__title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--abyss);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.post-hero__excerpt {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text2);
    font-weight: 400;
    border-left: 3px solid var(--brand);
    padding-left: 1.25rem;
    margin-bottom: 0;
}

/* ── IMAGEN DESTACADA ────────────────────────────────────── */
.post-featured-image-section {
    background: var(--white);
    padding: 0;
}

.post-featured-image-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    transform: translateY(-2rem);
}

.post-featured-image {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shlg);
}

/* ── DISEÑO DE CONTENIDO (DOS COLUMNAS) ───────────────────── */
.post-layout-section {
    background: var(--white);
    padding: 1rem 0 6rem;
}

.post-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3.5rem;
    position: relative;
}

@media (min-width: 1024px) {
    .post-layout-grid {
        grid-template-columns: 280px 1fr;
    }
}

/* Lateral Sticky (TOC) */
.post-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .post-sidebar {
        display: block;
        position: relative;
    }

    .post-sidebar-sticky {
        position: sticky;
        top: 8rem;
        max-height: calc(100vh - 10rem);
        overflow-y: auto;
        padding-right: 1rem;
    }
}

.toc-card {
    border-left: 1px solid var(--border);
    padding-left: 1.25rem;
}

.toc-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--abyss);
    margin-bottom: 1.25rem;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toc-item a {
    display: block;
    font-size: 0.85rem;
    color: var(--text3);
    line-height: 1.4;
    transition: all 0.25s ease;
    font-weight: 500;
}

.toc-item.level-h3 {
    padding-left: 1rem;
}

.toc-item.active a {
    color: var(--brand);
    font-weight: 700;
    transform: translateX(3px);
}

.toc-item a:hover {
    color: var(--brand2);
}

/* Columna de Contenido Principal */
.post-main-content {
    max-width: var(--article-max-width);
    margin: 0 auto;
    width: 100%;
}

.post-content-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--lagoon);
}

/* Estilos de bloque dentro del contenido */
.post-content-body p {
    margin-bottom: 1.75rem;
}

.post-content-body h2,
.post-content-body h3,
.post-content-body h4 {
    font-family: 'Bricolage Grotesque', sans-serif;
    color: var(--abyss);
    margin: 2.75rem 0 1.25rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.post-content-body h2 {
    font-size: 1.85rem;
    border-bottom: 1px solid rgba(76, 183, 155, 0.15);
    padding-bottom: 0.5rem;
}

.post-content-body h3 {
    font-size: 1.45rem;
}

.post-content-body h4 {
    font-size: 1.2rem;
}

.post-content-body strong {
    color: var(--abyss);
    font-weight: 700;
}

/* Listas */
.post-content-body ul,
.post-content-body ol {
    margin: 0 0 1.75rem 1.5rem;
    padding-left: 0.5rem;
}

.post-content-body li {
    margin-bottom: 0.6rem;
}

.post-content-body ul {
    list-style: none;
}

.post-content-body ul li {
    position: relative;
    padding-left: 1.25rem;
}

.post-content-body ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

/* Citas / Blockquotes */
.post-content-body blockquote {
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    background: var(--green-bg);
    border-left: 4px solid var(--brand);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    position: relative;
}

.post-content-body blockquote p {
    margin: 0;
    font-size: 1.2rem;
    color: var(--lagoon);
    font-weight: 500;
    line-height: 1.6;
}

.post-content-body blockquote::after {
    content: "“";
    position: absolute;
    right: 1.5rem;
    bottom: -1rem;
    font-size: 6rem;
    font-family: 'Bricolage Grotesque', sans-serif;
    color: rgba(76, 183, 155, 0.12);
    line-height: 1;
}

/* Enlaces */
.post-content-body a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.post-content-body a:hover {
    color: var(--abyss);
}

/* Tablas */
.post-layout-grid > * {
    min-width: 0;
}

.post-content-body table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: var(--sh);
    border-radius: 8px;
    overflow: hidden;
}

.post-content-body th,
.post-content-body td {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.post-content-body th,
.post-content-body td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.post-content-body th {
    background: var(--abyss);
    color: var(--white);
    font-weight: 700;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-content-body tr:nth-child(even) {
    background: #f7fafb;
}

.post-content-body tr:last-child td {
    border-bottom: none;
}

/* Imágenes dentro de contenido */
.post-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
    box-shadow: var(--shmd);
}

.post-content-body figcaption {
    font-size: 0.85rem;
    color: var(--text3);
    text-align: center;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Videos responsivos */
.post-content-body iframe,
.post-content-body video {
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
    box-shadow: var(--shmd);
}

/* Wrapper para videos embebidos de Youtube */
.embed-responsive-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: var(--shmd);
}

.embed-responsive-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
}

/* ── NAVEGACIÓN ENTRE ARTÍCULOS ──────────────────────────── */
.post-navigation {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 4rem 0 3rem;
}

@media (min-width: 768px) {
    .post-navigation {
        flex-direction: row;
        justify-content: space-between;
    }
}

.post-nav-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fcfdfe;
    transition: all 0.3s var(--ease-out);
    text-decoration: none;
}

.post-nav-card:hover {
    border-color: var(--brand);
    background: #f7fffe;
    transform: translateY(-2px);
}

.post-nav-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-nav-card__title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--abyss);
    line-height: 1.3;
    margin: 0;
}

.post-nav-card--next {
    text-align: right;
    align-items: flex-end;
}

.post-nav-card--next .post-nav-card__label {
    flex-direction: row-reverse;
}

/* ── CTA CORPORATIVO FINAL ──────────────────────────────── */
.post-cta-box {
    background-color: var(--brand-dark);
    background-image:
        radial-gradient(circle at top right, rgba(76, 183, 155, 0.18) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(191, 147, 94, 0.12) 0%, transparent 40%);
    color: var(--white);
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
    box-shadow: var(--shlg);
    margin: 4rem 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .post-cta-box {
        padding: 4.5rem 3.5rem;
    }
}

.post-cta-box h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    max-width: 20ch;
    margin: 0;
}

.post-cta-box p {
    font-size: 0.95rem;
    color: #9CA3AF;
    max-width: 50ch;
    line-height: 1.6;
    margin: 0 0 0.5rem;
}

/* Botón animado CTA */
.btn-sample {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.9rem 2.2rem;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.4s var(--ease-out);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-brand-green-primary {
    background: var(--brand-green-primary);
    color: var(--abyss);
}

.btn-brand-green-primary:hover {
    background: var(--brand-green-sec);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 183, 155, 0.4);
}

.btn-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: rgba(2, 23, 28, 0.15);
    font-size: 0.75rem;
    transition: transform 0.3s;
    color: inherit;
}

.btn-brand-green-primary:hover .btn-icon-circle {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
}

/* ── ARTÍCULOS RELACIONADOS ─────────────────────────────── */
.post-related-section {
    background: #f7fafb;
    padding: 5rem 0 6rem;
    border-top: 1px solid var(--border);
}

.post-related__title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--abyss);
    margin-bottom: 2.5rem;
    text-align: center;
}

.post-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .post-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.35s var(--ease-out);
    height: 100%;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand);
    box-shadow: var(--shlg);
}

.related-card__img-link {
    display: block;
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.related-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.related-card:hover .related-card__img {
    transform: scale(1.05);
}

.related-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-card__date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text3);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.related-card__date i {
    color: var(--brand);
    font-size: 0.65rem;
}

.related-card__title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--abyss);
    line-height: 1.35;
    margin: 0 0 1rem 0;
    flex-grow: 1;
}

.related-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.related-card__title a:hover {
    color: var(--brand);
}

.related-card__body .btn-read {
    margin-top: auto;
}

/* ── RESPONSIVE GENERAL ──────────────────────────────────── */
@media (max-width: 1023px) {
    .post-hero {
        padding: 5rem 0 2.5rem;
    }
}
