/* =============================================================
   Single Post — single.php
   ============================================================= */

/* ── Outer Wrap ─────────────────────────────────────────────── */
.aceweld-single-wrap {
    padding: 2.5rem 0 4rem;
    background: #f5f7fa;
}

/* ── Two-column layout ──────────────────────────────────────── */
.aceweld-single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start;
}

/* ── Main Column ────────────────────────────────────────────── */
.aceweld-single-main {
    min-width: 0;
}

/* ── Article Card ───────────────────────────────────────────── */
.aceweld-single-article {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--aceweld-border);
    padding: 2.25rem 2.5rem;
}

/* ── Title ──────────────────────────────────────────────────── */
.aceweld-single__title {
    font-family: var(--aceweld-heading-font);
    font-size: 1.875rem;
    font-weight: 800;
    color: #1a2b4b;
    line-height: 1.3;
    margin: 0 0 1.25rem;
}

/* ── Meta row ───────────────────────────────────────────────── */
.aceweld-single__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--aceweld-border);
    margin-bottom: 1.75rem;
}

.aceweld-single__meta-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.aceweld-single__date {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--aceweld-muted);
}

.aceweld-single__updated {
    font-size: .8125rem;
    color: var(--aceweld-muted);
    padding-left: .75rem;
    border-left: 1px solid var(--aceweld-border);
}

/* ── Share buttons ──────────────────────────────────────────── */
.aceweld-single__share {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.aceweld-single__share-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--aceweld-muted);
    margin-right: .15rem;
}

.aceweld-share-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .8rem;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: opacity .18s, transform .15s;
    line-height: 1;
}

.aceweld-share-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}

.aceweld-share-btn--facebook  { background: #1877f2; }
.aceweld-share-btn--twitter   { background: #000; }
.aceweld-share-btn--linkedin  { background: #0a66c2; }
.aceweld-share-btn--whatsapp  { background: #25d366; }

/* ── Featured Image ─────────────────────────────────────────── */
.aceweld-single__thumbnail {
    margin-bottom: 1.75rem;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}

.aceweld-single__thumbnail-img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

/* ── Post content (typography) ──────────────────────────────── */
.aceweld-entry-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--aceweld-text);
}

.aceweld-entry-content h2,
.aceweld-entry-content h3,
.aceweld-entry-content h4 {
    font-family: var(--aceweld-heading-font);
    color: #1a2b4b;
    margin: 2rem 0 .75rem;
    line-height: 1.35;
}

.aceweld-entry-content h2 { font-size: 1.5rem; }
.aceweld-entry-content h3 { font-size: 1.25rem; }
.aceweld-entry-content h4 { font-size: 1.0625rem; }

.aceweld-entry-content p {
    margin: 0 0 1.2rem;
}

.aceweld-entry-content ul,
.aceweld-entry-content ol {
    margin: 0 0 1.2rem 1.5rem;
    padding: 0;
}

.aceweld-entry-content li {
    margin-bottom: .45rem;
}

.aceweld-entry-content a {
    color: #1a4d8c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.aceweld-entry-content a:hover {
    color: #c0392b;
}

.aceweld-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 1.25rem auto;
}

.aceweld-entry-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #1a2b4b;
    background: #f8fafc;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--aceweld-muted);
}

.aceweld-entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: .9375rem;
}

.aceweld-entry-content th,
.aceweld-entry-content td {
    padding: .65rem 1rem;
    border: 1px solid var(--aceweld-border);
    text-align: left;
}

.aceweld-entry-content th {
    background: #f1f5f9;
    font-weight: 700;
    color: #1a2b4b;
}

.aceweld-entry-content pre,
.aceweld-entry-content code {
    font-family: "Fira Code", "Consolas", "Monaco", monospace;
    background: #f1f5f9;
    border-radius: 4px;
}

.aceweld-entry-content code {
    padding: .1em .35em;
    font-size: .9em;
}

.aceweld-entry-content pre {
    padding: 1.1rem 1.25rem;
    overflow-x: auto;
    margin: 1.25rem 0;
    font-size: .875rem;
    line-height: 1.6;
}

.aceweld-entry-content pre code {
    background: none;
    padding: 0;
}

/* ── Tags ───────────────────────────────────────────────────── */
.aceweld-single__tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--aceweld-border);
}

.aceweld-single__tags-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--aceweld-muted);
    margin-right: .25rem;
}

.aceweld-single__tag {
    display: inline-block;
    padding: .25rem .75rem;
    background: #f1f5f9;
    border: 1px solid var(--aceweld-border);
    border-radius: 100px;
    font-size: .8125rem;
    color: var(--aceweld-text);
    text-decoration: none;
    transition: background .18s, border-color .18s, color .18s;
}

.aceweld-single__tag:hover {
    background: #1a2b4b;
    border-color: #1a2b4b;
    color: #fff;
    text-decoration: none;
}

/* ── Prev / Next Navigation ─────────────────────────────────── */
.aceweld-single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.aceweld-single-nav__item {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--aceweld-border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color .2s, box-shadow .2s;
}

.aceweld-single-nav__item:hover {
    border-color: #1a2b4b;
    box-shadow: 0 3px 12px rgba(26,43,75,.1);
    text-decoration: none;
    color: inherit;
}

.aceweld-single-nav__item--next {
    text-align: right;
}

.aceweld-single-nav__dir {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--aceweld-muted);
}

.aceweld-single-nav__label {
    font-family: var(--aceweld-heading-font);
    font-size: .9375rem;
    font-weight: 600;
    color: #1a2b4b;
    line-height: 1.4;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.aceweld-single-sidebar {
    position: sticky;
    top: 1.5rem;
}

.aceweld-sidebar-widget {
    background: #fff;
    border: 1px solid var(--aceweld-border);
    border-radius: 10px;
    overflow: hidden;
}

.aceweld-sidebar-widget__title {
    font-family: var(--aceweld-heading-font);
    font-size: 1rem;
    font-weight: 700;
    color: var(--aceweld-text);
    margin: 0;
    padding: 1rem 1.25rem .85rem;
    border-bottom: 2px solid var(--aceweld-border);
    position: relative;
}

.aceweld-sidebar-widget__title::after {
    content: '';
    position: absolute;
    left: 1.25rem;
    bottom: -2px;
    width: 2.5rem;
    height: 2px;
    background: #c0392b;
}

/* ── Recent posts list ──────────────────────────────────────── */
.aceweld-sidebar-recent {
    list-style: none;
    margin: 0;
    padding: .25rem 0;
}

.aceweld-sidebar-recent__item {
    border-bottom: 1px solid #f1f5f9;
}

.aceweld-sidebar-recent__item:last-child {
    border-bottom: none;
}

.aceweld-sidebar-recent__link {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
    padding: .9rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: background .18s;
}

.aceweld-sidebar-recent__link:hover {
    background: #fafbfc;
    text-decoration: none;
    color: inherit;
}

.aceweld-sidebar-recent__thumb {
    flex-shrink: 0;
    width: 88px;
    height: 66px;
    border-radius: 5px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aceweld-sidebar-recent__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.aceweld-sidebar-recent__link:hover .aceweld-sidebar-recent__thumb img {
    transform: scale(1.06);
}

.aceweld-sidebar-recent__thumb--empty {
    border: 1px solid var(--aceweld-border);
}

.aceweld-sidebar-recent__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding-top: .1rem;
}

.aceweld-sidebar-recent__title {
    font-size: .9rem;
    font-weight: 500;
    color: var(--aceweld-text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .18s;
}

.aceweld-sidebar-recent__link:hover .aceweld-sidebar-recent__title {
    color: #c0392b;
}

.aceweld-sidebar-recent__meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    color: #94a3b8;
    flex-wrap: wrap;
}

.aceweld-sidebar-recent__meta time {
    color: #94a3b8;
}

.aceweld-sidebar-recent__meta-sep {
    color: #cbd5e1;
    line-height: 1;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .aceweld-single-layout {
        grid-template-columns: 1fr 260px;
        gap: 1.75rem;
    }
    .aceweld-single-article {
        padding: 1.75rem 2rem;
    }
}

@media (max-width: 800px) {
    .aceweld-single-layout {
        grid-template-columns: 1fr;
    }
    .aceweld-single-sidebar {
        position: static;
    }
    .aceweld-single__title {
        font-size: 1.5rem;
    }
}

@media (max-width: 540px) {
    .aceweld-single-article {
        padding: 1.25rem 1.25rem;
    }
    .aceweld-single__meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .aceweld-single__share {
        width: 100%;
    }
    .aceweld-single-nav {
        grid-template-columns: 1fr;
    }
    .aceweld-share-btn span {
        display: none;
    }
    .aceweld-share-btn {
        padding: .4rem .6rem;
    }
}
