/*-----------------------------------------------------------------------------------
    Selberry - Blog page (linked from resources/views/blog.blade.php only)
    3-column grid of post cards (2 on tablets, 1 on phones), same look as the home blog cards:
    picture with a category tag, author and reading time, title (2 lines), excerpt (3 lines).
    Fills use the brand gradients from brand.css (--sb-grad).
-----------------------------------------------------------------------------------*/

.sb-blog-page {
    background-color: #ffffff;
}
.sb-blog-page .section-title {
    margin-bottom: 50px;
}
.sb-blog-page .section-title p {
    max-width: 640px;
    margin: 18px auto 0;
    line-height: 1.8;
}

/* post card */
.sb-post {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 15px 40px rgba(6, 40, 27, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.sb-post:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(6, 40, 27, 0.14);
}
.sb-post-img {
    position: relative;
    height: 240px;
    overflow: hidden;
}
/* the picture sits on its own layer so it can zoom without moving the tag */
.sb-post-img .ph {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}
.sb-post:hover .sb-post-img .ph {
    transform: scale(1.06);
}
.sb-post-img .tag {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1;
    padding: 6px 16px;
    border-radius: 30px;
    background: var(--sb-grad);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
}
.sb-post-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 26px 28px 28px;
}
.sb-post-body .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px; /* author, date and reading time wrap onto 2 tidy lines on narrow cards */
    margin: 0;
    padding: 0;
    list-style: none;
    color: #6b7c73;
    font-size: 14px;
}
.sb-post-body .meta i {
    margin-right: 6px;
    color: #2E7D44;
}
.sb-post-body h3 {
    margin: 12px 0;
    color: #0B3A28;
    font-size: 22px;
    line-height: 1.35;
    transition: color 0.4s ease;
    /* title: 2 lines, then "..." */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.sb-post-body .excerpt {
    margin: 0 0 20px;
    line-height: 1.7;
    /* excerpt: 3 lines, then "..." */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}
.sb-post-body .read-more {
    margin-top: auto;
    color: #2E7D44;
    font-weight: 600;
}
.sb-post-body .read-more i {
    margin-left: 8px;
    transition: margin 0.4s ease;
}
.sb-post:hover h3 {
    color: #2E7D44;
}
.sb-post:hover .read-more i {
    margin-left: 14px;
}
@media (max-width: 575px) {
    .sb-blog-page .section-title {
        margin-bottom: 36px;
    }
    .sb-post-img {
        height: 210px;
    }
    .sb-post-body {
        padding: 22px 22px 24px;
    }
    .sb-post-body h3 {
        font-size: 20px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .sb-post,
    .sb-post-img .ph {
        transition: none;
    }
}

/*-----------------------------------------------------------------------------------
    Blog article pages (resources/views/include/blog/*.blade.php)
    Banner with the post title, article (picture, "In This Article" list, text, contact box)
    on the left, sticky sidebar (Recent Blogs + dark contact card) on the right.
-----------------------------------------------------------------------------------*/
.sb-post-banner .breadcrumb-list a {
    color: #B8DC8E;
    transition: color 0.3s ease;
}
.sb-post-banner .breadcrumb-list a:hover {
    color: #ffffff;
}
/* post titles are long, so the banner heading is smaller than on the other pages */
.sb-post-banner .page-heading .breadcrumb-title {
    max-width: 880px;
    font-size: clamp(34px, 4.2vw, 58px);
    line-height: 1.2;
}
.sb-post-banner-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
}
.sb-post-banner-meta i {
    margin-right: 6px;
    color: #B8DC8E;
}

.sb-post-details {
    background-color: #ffffff;
}
/* the theme's .fix (overflow: hidden) would stop the sticky sidebar; clip keeps the sides tidy without that */
.sb-post-details.fix {
    overflow: clip;
}

/* article */
.sb-article-img {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
}
.sb-article-img .tag {
    position: absolute;
    top: 24px;
    left: 24px;
    padding: 7px 18px;
    border-radius: 30px;
    background: var(--sb-grad);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}
.sb-article-toc {
    margin: 36px 0 10px;
    padding: 26px 30px;
    border: 1px solid #e0eadb;
    border-radius: 20px;
    background-color: #F3F8EF;
}
.sb-article-toc .toc-title {
    margin: 0 0 12px;
    color: #0B3A28;
    font-size: 18px;
    font-weight: 700;
}
/* bullets, not numbers: some headings already start with "1.", "2." ... */
.sb-article-toc ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}
.sb-article-toc li {
    padding: 4px 0;
    color: #63A04A;
}
.sb-article-toc a {
    color: #33473b;
    transition: color 0.3s ease;
}
.sb-article-toc a:hover {
    color: #2E7D44;
}
.sb-article h2 {
    margin: 40px 0 14px;
    color: #0B3A28;
    font-size: 28px;
    line-height: 1.3;
    scroll-margin-top: 110px; /* clear of the sticky header when opened from the list */
}
.sb-article p {
    margin: 0 0 18px;
    color: #4a5a50;
    font-size: 17px;
    line-height: 1.9;
}
.sb-article-cta {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 40px;
    padding: 28px 30px;
    border: 1px solid #e0eadb;
    border-radius: 20px;
    background-color: #F3F8EF;
}
.sb-article .sb-article-cta p {
    flex: 1;
    margin: 0;
    color: #0B3A28;
    font-weight: 600;
    line-height: 1.6;
}
.sb-article-cta .theme-btn {
    flex-shrink: 0;
}
.sb-article-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    color: #2E7D44;
    font-weight: 600;
}
.sb-article-back:hover i {
    transform: translateX(-4px);
}
.sb-article-back i {
    transition: transform 0.3s ease;
}

/* sidebar */
.sb-post-side {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 30px;
}
.sb-side-box {
    padding: 30px 28px;
    border: 1px solid #e0eadb;
    border-radius: 20px;
    background-color: #ffffff;
    box-shadow: 0 15px 40px rgba(6, 40, 27, 0.06);
}
.sb-side-title {
    position: relative;
    margin: 0 0 22px;
    padding-bottom: 14px;
    color: #0B3A28;
    font-size: 22px;
}
.sb-side-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 3px;
    border-radius: 3px;
    background: var(--sb-grad);
}
.sb-recent {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sb-recent a {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sb-recent .th {
    flex: 0 0 92px;
    height: 80px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
}
.sb-recent .tx {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.sb-recent .cat {
    color: #2E7D44;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.sb-recent strong {
    color: #0B3A28;
    font-size: 16px;
    line-height: 1.4;
    transition: color 0.3s ease;
    /* 2 lines, then "..." */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.sb-recent a:hover strong {
    color: #2E7D44;
}
.sb-recent .meta {
    color: #6b7c73;
    font-size: 13px;
}
.sb-recent .meta i {
    margin-right: 5px;
}
.sb-side-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: #2E7D44;
    font-weight: 600;
}
.sb-side-cta {
    padding: 32px 28px;
    border-radius: 20px;
    background: var(--sb-grad);
    color: #ffffff;
}
.sb-side-cta h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 24px;
}
.sb-side-cta p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}
/* dark card: footer newsletter button style */
.sb-side-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 30px;
    background: var(--sb-grad-light);
    color: #0B3A28;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease;
}
.sb-side-btn:hover {
    background: #ffffff;
    color: #0B3A28;
}
@media (max-width: 991px) {
    .sb-post-side {
        position: static;
    }
}
@media (max-width: 575px) {
    .sb-post-banner-meta {
        gap: 8px 18px;
        font-size: 14px;
    }
    .sb-article-img {
        border-radius: 18px;
    }
    .sb-article-toc {
        padding: 22px 20px;
    }
    .sb-article h2 {
        font-size: 24px;
    }
    .sb-article p {
        font-size: 16px;
    }
    .sb-article-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
    }
    .sb-side-box,
    .sb-side-cta {
        padding: 26px 20px;
    }
}
