﻿/* =====================================================================
   Star Gems Blog - Stylesheet
   Brand tokens supplied by client
===================================================================== */
:root {
    --default-font: "IBM Plex Sans", sans-serif;
    --heading-font: "Cormorant Garamond", serif;
    --nav-font: "IBM Plex Sans", sans-serif;
    --main-color: #6487af;
    --accent-color: #3A5778;
    --text-dark: #1f2430;
    --text-muted: #767c88;
    --border-light: #e7e7e7;
}

.sg-blog-wrap {
    margin: 0 auto;
    padding: 40px 20px 80px;
    font-family: var(--default-font);
    color: var(--text-dark);
}

/* Add to assets/css/blog.css */
.sg-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--nav-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-color);
    text-decoration: none;
    margin-bottom: 22px;
}

    .sg-back-btn:hover {
        text-decoration: underline;
    }


/* ---------------- Hero / Featured post ---------------- */
.sg-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 30px 0 50px;
}

.sg-hero-eyebrow {
    font-family: var(--nav-font);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.sg-hero-title {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 40px;
    line-height: 1.15;
    color: var(--text-dark);
    margin: 0 0 18px;
}

    .sg-hero-title a {
        color: inherit;
        text-decoration: none;
    }

.sg-hero-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 26px;
    max-width: 460px;
}

.sg-btn-readmore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--text-dark);
    color: #fff;
    font-family: var(--nav-font);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 999px;
    transition: background .2s ease;
}

    .sg-btn-readmore:hover {
        background: var(--accent-color);
        color: #fff;
    }

.sg-hero-image {
    border-radius: 18px;
    overflow: hidden;
    height: 340px;
    box-shadow: 0 20px 40px rgba(20, 30, 50, .15);
}

    .sg-hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* ---------------- Section heading ---------------- */
.sg-section-heading {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 26px;
    color: var(--text-dark);
    margin: 10px 0 26px;
    padding-top: 30px;
    border-top: 1px solid var(--border-light);
}

/* ---------------- Latest news grid ---------------- */
.sg-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 34px 28px;
}

.sg-news-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.sg-news-thumb {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    height: 190px;
    margin-bottom: 14px;
    background: var(--main-color);
}

    .sg-news-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .35s ease;
    }

.sg-news-card:hover .sg-news-thumb img {
    transform: scale(1.05);
}

.sg-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: var(--nav-font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent-color);
    padding: 5px 12px;
    border-radius: 999px;
}

.sg-news-title {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 19px;
    line-height: 1.3;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.sg-news-date {
    font-family: var(--nav-font);
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------------- Pagination ---------------- */
.sg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    font-family: var(--nav-font);
}

    .sg-pagination a,
    .sg-pagination span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        border-radius: 999px;
        font-size: 14px;
        text-decoration: none;
        color: var(--text-dark);
        border: 1px solid var(--border-light);
    }

        .sg-pagination a:hover {
            border-color: var(--main-color);
            color: var(--main-color);
        }

    .sg-pagination .current {
        background: var(--accent-color);
        border-color: var(--accent-color);
        color: #fff;
    }

    .sg-pagination .disabled {
        color: #c7c9d1;
        pointer-events: none;
    }

/* ---------------- Blog detail page ---------------- */
.sg-detail-header {
    text-align: left;
    margin: 0 auto 30px;
}

.sg-detail-list {
    display: flex;
    gap: 10px;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}

.sg-detail-category {
    font-family: var(--nav-font);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0;
    background: var(--text-muted);
    color: #fff;
    padding: 5px 10px;
    border-radius: 10px;
}

.sg-detail-title {
    font-family: var(--heading-font);
    font-size: 42px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
    margin: 0 0 16px;
}

.sg-detail-meta {
    font-family: var(--nav-font);
    font-size: 13px;
    color: var(--text-muted);
}

    .sg-detail-meta span + span::before {
        content: "•";
        margin: 0 8px;
        color: var(--border-light);
    }

.sg-detail-image {
    margin: 0 auto 36px;
    overflow: hidden;
}

    .sg-detail-image img {
        border-radius: 18px;
    }

.sg-detail-content {
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
}

    .sg-detail-content h2,
    .sg-detail-content h3 {
        font-family: var(--heading-font);
        color: var(--text-dark);
        margin-top: 34px;
    }

    .sg-detail-content p {
        margin: 0 0 18px;
    }

    .sg-detail-content img {
        max-width: 100%;
        border-radius: 12px;
        margin: 10px 0;
    }

/* ---------------- Share row ---------------- */
.sg-share-row {
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 14px;
}

.sg-share-label {
    font-family: var(--nav-font);
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 6px;
}

.sg-share-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f2f4f7;
    color: var(--accent-color);
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

    .sg-share-icon:hover {
        background: var(--accent-color);
        color: #fff;
    }

    .sg-share-icon svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
    }

.tbl_blog th, .tbl_blog td {
    padding: 5px 20px;
}

/* ---------------- Prev / Next navigation ---------------- */
.sg-prev-next {
    margin: 26px auto 0;
    padding-top: 26px;
    border-top: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sg-pn-link {
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: border-color .2s ease, background .2s ease;
}

    .sg-pn-link:hover {
        border-color: var(--main-color);
        background: #f7f9fc;
    }

.sg-pn-next {
    text-align: right;
    align-items: flex-end;
}

.sg-pn-label {
    font-family: var(--nav-font);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sg-pn-next .sg-pn-label {
    flex-direction: row-reverse;
}

.sg-pn-title {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.35;
}

.sg-pn-placeholder {
    visibility: hidden;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    .sg-hero {
        grid-template-columns: 1fr;
    }

    .sg-hero-image {
        order: -1;
        height: 100%;
    }

    .sg-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .sg-blog-wrap {
        padding: 40px 0px 80px;
    }

    .sg-detail-content h2, .sg-detail-content h3 {
        font-size: 20px;
    }

    .sg-detail-content p {
        font-size: 15px;
        text-align: left;
    }

    .sg-detail-content ul {
        font-size: 15px;
        text-align: left;
    }

    .tbl_blog {
        font-size: 15px;
        text-align: left;
    }

        .tbl_blog ul {
            line-height: normal;
            padding-left: 22px;
        }

            .tbl_blog ul li {
                padding-bottom: 10px;
            }

        .tbl_blog th, .tbl_blog td {
            padding: 5px;
        }

    .sg-news-grid {
        grid-template-columns: 1fr;
    }

    .sg-detail-title {
        font-size: 30px;
    }

    .sg-prev-next {
        grid-template-columns: 1fr;
    }

    .sg-pn-next {
        text-align: left;
        align-items: flex-start;
    }

        .sg-pn-next .sg-pn-label {
            flex-direction: row;
        }
}
