/* ==========================================================================
   Single Post (Blog / News)
   ========================================================================== */

.post-page {
    margin-top: var(--header-height);
}

/* --- Hero ------------------------------------------------------------------ */
.post-hero {
    padding: 40px 0 48px;
    border-bottom: 1px solid var(--color-border);
}

.post-hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.post-hero__chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gold);
    border: 1px solid rgba(197,160,40,0.4);
    border-radius: 999px;
    text-decoration: none;
    transition: all var(--transition);
}
.post-hero__chip:hover {
    background: var(--color-gold);
    color: var(--color-white);
    border-color: var(--color-gold);
}

.post-hero__date {
    font-size: 0.82rem;
    color: var(--color-text);
    font-weight: 500;
}

.post-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-dark);
    letter-spacing: -0.015em;
    margin: 0 0 20px;
    max-width: 900px;
}

.post-hero__excerpt {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--color-text);
    max-width: 760px;
}

/* --- Layout --------------------------------------------------------------- */
.post-body {
    padding: 56px 0 80px;
}

.post-body__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
    align-items: start;
}

/* --- Thumbnail ------------------------------------------------------------ */
.post-featured-image {
    margin-bottom: 40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 18px 40px -20px rgba(26,39,48,0.18);
}
.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Entry Content -------------------------------------------------------- */
.post-entry {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-text);
}

.post-entry h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 800;
    color: var(--color-dark);
    margin: 48px 0 16px;
    padding-left: 16px;
    border-left: 3px solid var(--color-gold);
    letter-spacing: -0.01em;
}
.post-entry h2:first-child { margin-top: 0; }

.post-entry h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 32px 0 12px;
}

.post-entry p {
    margin-bottom: 20px;
}
.post-entry p:last-child { margin-bottom: 0; }

.post-entry ul,
.post-entry ol {
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
}

.post-entry ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}
.post-entry ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-gold);
    flex-shrink: 0;
}

.post-entry ol {
    counter-reset: post-ol;
}
.post-entry ol li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    counter-increment: post-ol;
}
.post-entry ol li::before {
    content: counter(post-ol);
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-gold);
    background: rgba(197,160,40,0.1);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.post-entry a {
    color: var(--color-gold);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.post-entry a:hover { color: var(--color-gold-hover); }

/* Table */
.post-entry table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.post-entry table thead tr {
    background: var(--color-dark);
    color: var(--color-white);
}
.post-entry table thead th {
    padding: 14px 18px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
}
.post-entry table thead th:first-child { color: var(--color-gold); }
.post-entry table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}
.post-entry table tbody tr:last-child { border-bottom: none; }
.post-entry table tbody tr:hover { background: var(--color-light); }
.post-entry table tbody td {
    padding: 13px 18px;
    vertical-align: top;
}
.post-entry table tbody td:first-child {
    font-weight: 600;
    color: var(--color-dark);
}

/* Blockquote */
.post-entry blockquote {
    margin: 32px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--color-gold);
    background: rgba(197,160,40,0.06);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-dark);
}

/* strong */
.post-entry strong {
    font-weight: 700;
    color: var(--color-dark);
}

/* --- Sidebar ------------------------------------------------------------- */
.post-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-sidebar__card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.post-sidebar__card-head {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 14px 20px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.post-sidebar__card-head span { color: var(--color-gold); }

.post-sidebar__card-body {
    padding: 20px;
}

.post-toc {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-toc a {
    display: block;
    padding: 7px 10px;
    font-size: 0.875rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-weight: 500;
    line-height: 1.35;
    border-left: 2px solid transparent;
}
.post-toc a:hover {
    background: var(--color-light);
    color: var(--color-dark);
    border-left-color: var(--color-gold);
    padding-left: 14px;
}

/* CTA card */
.post-cta-card {
    background: var(--color-dark);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
}
.post-cta-card__title {
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 10px;
    line-height: 1.3;
}
.post-cta-card__text {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 20px;
    line-height: 1.55;
}
.post-cta-card .btn { width: 100%; }

/* --- Footer --------------------------------------------------------------- */
.post-footer {
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 960px) {
    .post-body__grid {
        grid-template-columns: 1fr;
    }
    .post-sidebar {
        position: static;
        order: -1;
    }
    .post-sidebar__card:not(:first-child) { display: none; }
}

@media (max-width: 640px) {
    .post-hero { padding: 28px 0 32px; }
    .post-hero__title { font-size: 1.5rem; }
    .post-body { padding: 36px 0 56px; }
    .post-entry h2 { font-size: 1.2rem; }
    .post-entry table { font-size: 0.85rem; }
    .post-entry table thead th,
    .post-entry table tbody td { padding: 10px 12px; }
}
