/* ════════════════════════════════════════════════
   Single Post Page Styles
   ════════════════════════════════════════════════ */
.ce-single-post-page {
    width: 100%;
    padding: 40px 0 60px
}

/* ── Back link ── */
.ce-post-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    margin-bottom: 28px;
    transition: color .2s;
}

.ce-post-back:hover {
    color: #b5865a
}

.ce-post-back svg {
    flex-shrink: 0
}

/* ── Header ── */
.ce-post-header {
    text-align: right;
    margin-bottom: 32px
}

.ce-post-title {
    font-size: clamp(22px, 3.5vw, 34px);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 14px;
}

.ce-post-meta {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #888;
}

.ce-post-meta-sep {
    color: #ccc
}

.ce-post-cat {
    color: #b5865a;
    text-decoration: none;
    font-size: 14px;
    transition: opacity .2s;
}

.ce-post-cat:hover {
    opacity: .75
}

/* ── Featured image ── */
.ce-post-featured {
    width: 100%;
    margin-bottom: 36px;
    border-radius: 20px;
    overflow: hidden;
    background: #f0f0f0;
}

.ce-post-featured img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 660px;
    object-fit: cover;
}

/* ── Smart Layout Grids ── */
.mt-layout-row {
    margin-bottom: 40px;
}

.mt-layout-row h2 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.mt-layout-row .mt-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.mt-gallery-item a {
    display: block;
    height: 100%;
}

.mt-grid {
    display: grid;
    gap: 24px;
    margin: 30px 0;
}

.mt-grid img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* Style 1: 50/50 */
.mt-grid-s1 {
    grid-template-columns: 1fr 1fr;
}

/* Style 2: 60/40 */
.mt-grid-s2 {
    grid-template-columns: 1.4fr 1fr;
}

/* Style 3: 40/60 */
.mt-grid-s3 {
    grid-template-columns: 1fr 1.4fr;
}

/* Gallery Columns */
.mt-gallery-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.mt-gallery-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.mt-gallery-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.mt-gallery-5 {
    grid-template-columns: repeat(5, 1fr) !important;
}

.mt-gallery-6 {
    grid-template-columns: repeat(6, 1fr) !important;
}

@media (max-width: 768px) {
    .mt-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

.ce-post-featured.is-contained {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.ce-post-subtitle {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #b5865a;
    margin-bottom: 10px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .mt-layout-2-col {
        grid-template-columns: 1fr;
    }
}

/* ── Body content ── */
.ce-post-content {
    font-size: 15px;
    line-height: 1.85;
    color: #333;
    margin-bottom: 60px;
}

.ce-post-content p {
    margin: 0 0 18px;
}

.ce-post-content h2,
.ce-post-content h3,
.ce-post-content h4 {
    color: #1a1a1a;
    font-weight: 600;
    margin: 32px 0 12px;
}

.ce-post-content h2 {
    font-size: 22px
}

.ce-post-content h3 {
    font-size: 19px
}

.ce-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    margin: 16px 0
}

.ce-post-content ul,
.ce-post-content ol {
    padding-left: 24px;
    margin: 0 0 18px
}

.ce-post-content li {
    margin-bottom: 6px
}

.ce-post-content a {
    color: #b5865a;
    text-decoration: underline
}

.ce-post-content blockquote {
    border-left: 3px solid #b5865a;
    padding: 12px 20px;
    margin: 24px 0;
    background: #fdf8f4;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
}

/* ── Tags ── */
.ce-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.ce-post-tag {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    border-radius: 3px;
    padding: 4px 10px;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.ce-post-tag:hover {
    background: #b5865a;
    color: #fff
}

/* ── Related Posts ── */
.ce-related-posts {
    padding-top: 40px;
    border-top: 1px solid #ebebeb
}

.ce-related-heading {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 28px;
}

.ce-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ce-rel-post-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ebebeb;
    transition: transform .3s ease, box-shadow .3s ease;
}

.ce-rel-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
}

.ce-rel-thumb {
    height: 300px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.ce-rel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.ce-rel-post-card:hover .ce-rel-thumb img {
    transform: scale(1.06)
}

.ce-rel-no-img {
    width: 100%;
    height: 100%;
    background: #e8e8e8
}

.ce-rel-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column
}

.ce-rel-post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ce-rel-post-cat {
    font-size: 12px;
    color: #b5865a;
    text-decoration: none
}

.ce-rel-post-title {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Common Extras ── */
.ce-rel-thumb-overlay,
.ce-rel-btn-wrapper {
    display: none;
}

/* ── Related Posts Style 2 (Grid Overlay) ── */
.ce-related-style-2 .ce-related-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ce-related-style-2 .ce-rel-post-card {
    position: relative;
    height: 420px;
    border: none;
    border-radius: 20px;
}

.ce-related-style-2 .ce-rel-thumb {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    z-index: 1;
}

.ce-related-style-2 .ce-rel-thumb img {
    height: 100%;
}

.ce-related-style-2 .ce-rel-thumb-overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 2;
}

.ce-related-style-2 .ce-rel-body {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 30px 24px;
    background: transparent;
}

.ce-related-style-2 .ce-rel-post-meta,
.ce-related-style-2 .ce-rel-post-cat {
    color: #fff;
    opacity: 0.9;
}

.ce-related-style-2 .ce-rel-content-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.ce-related-style-2 .ce-rel-post-title {
    color: #fff;
    margin: 0;
    font-size: 20px;
    line-height: 1.4;
}

.ce-related-style-2 .ce-rel-btn-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ce-related-style-2 .ce-rel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #fff;
    color: #1a1a1a;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

.ce-related-style-2 .ce-rel-btn svg {
    transform: rotate(-30deg);
    transition: transform 0.4s ease;
}

.ce-related-style-2 .ce-rel-post-card:hover .ce-rel-btn svg {
    transform: rotate(0deg);
}

/* ── Responsive ── */
@media(max-width:992px) {

    .ce-related-grid,
    .ce-related-style-2 .ce-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:600px) {

    .ce-related-grid,
    .ce-related-style-2 .ce-related-grid {
        grid-template-columns: 1fr;
    }

    .ce-post-content {
        font-size: 14px;
    }

    .ce-single-post-page {
        padding: 24px 0 40px;
    }

    .ce-post-title {
        font-size: 20px;
    }

    .ce-related-style-2 .ce-rel-post-card {
        height: 360px;
    }
}