
:root {
    --sb-accent:#662583;
    --sb-ink: #1b2a22;
    --sb-cream: #f7f2ea;
    --sb-line: #e6dfd2;
}

.sb-section {
    background: var(--sb-cream);
    padding: 90px 0 100px;
}

/* ---------- Listing header ---------- */
.sb-head {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 50px;
    align-items: end;
    margin-bottom: 46px;
}

.sb-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sb-accent);
    margin-bottom: 16px;
}

.sb-eyebrow::before {
    content: "";
    width: 36px;
    height: 2px;
    background: var(--sb-accent);
}

.sb-head h2 {
    font-size: 46px;
    line-height: 1.1;
    color: var(--sb-ink);
    margin: 0;
}

.sb-head h2 em {
    font-style: normal;
    color: var(--sb-accent);
}

.sb-head p {
    font-size: 17px;
    line-height: 1.8;
    color: #4d5a52;
    margin: 0;
}

/*.sb-stats {*/
/*    display: flex;*/
/*    gap: 0;*/
/*    margin-bottom: 46px;*/
/*    border-top: 1px solid var(--sb-line);*/
/*    border-bottom: 1px solid var(--sb-line);*/
/*}*/


.sb-stats {
    display: flex;
    gap: 0;
    margin-bottom: 46px;
    position: relative;
    padding-top: 1px;
    padding-bottom: 1px;
}

.sb-stats::before,
.sb-stats::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, purple, gold);
}

.sb-stats::before {
    top: 0;
}

.sb-stats::after {
    bottom: 0;
}


.sb-stat {
    flex: 1;
    padding: 22px 10px;
    text-align: center;
    border-right: 1px solid var(--sb-line);
}

.sb-stat:last-child {
    border-right: 0;
}

.sb-stat b {
    display: block;
    font-size: 34px;
    line-height: 1;
    color: var(--sb-ink);
}

.sb-stat span {
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7b867f;
}

/* ---------- Cards (equal height, short) ---------- */
.sb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.sb-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--sb-line);
    border-radius: 20px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform .3s, box-shadow .3s, border-color .3s;
}

.sb-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(27, 42, 34, .12);
    border-color: transparent;
}

.sb-card .sb-img {
    position: relative;
    height: 190px;
    border-radius: 14px;
    overflow: hidden;
}

.sb-card .sb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s;
}

.sb-card:hover .sb-img img {
    transform: scale(1.07);
}

.sb-date {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: #fff;
    color: var(--sb-ink);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 30px;
}

.sb-media-count {
    position: absolute;
    right: 10px;
    top: 10px;
    background: var(--sb-ink);
    color: #fff;
    font-size: 12px;
    padding: 5px 11px;
    border-radius: 30px;
}

.sb-media-count i {
    margin-right: 5px;
}

.sb-card .sb-body {
    padding: 18px 12px 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sb-card h3 {
    font-size: 21px;
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--sb-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-card p {
    font-size: 15px;
    line-height: 1.65;
    color: #5a665f;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: calc(1.65em * 3);
}

/* fixed 3 lines = equal height */

.sb-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px dashed var(--sb-line);
}

.sb-loc {
    font-size: 13px;
    color: #7b867f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 62%;
}

.sb-loc i {
    color: var(--sb-accent);
    margin-right: 6px;
}

.sb-view {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    color: var(--sb-ink);
}

.sb-view i {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sb-ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background .3s, transform .3s;
}

.sb-card:hover .sb-view i {
    background: var(--sb-accent);
    transform: translateX(4px);
}

/* ---------- Details page ---------- */
.sb-detail-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 70px;
}

.sb-detail-hero h2 {
    font-size: 44px;
    line-height: 1.1;
    color: var(--sb-ink);
    margin: 0 0 12px;
}

.sb-detail-hero .sb-tag {
    font-weight: 700;
    color: var(--sb-accent);
    font-size: 18px;
    margin-bottom: 18px;
}

.sb-detail-hero p {
    font-size: 17px;
    line-height: 1.85;
    color: #4d5a52;
}

.sb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.sb-chip {
    background: #fff;
    border: 1px solid var(--sb-line);
    border-radius: 30px;
    padding: 9px 16px;
    font-size: 14px;
    color: var(--sb-ink);
}

.sb-chip i {
    color: var(--sb-accent);
    margin-right: 8px;
}

.sb-detail-img {
    position: relative;
}

.sb-detail-img::before {
    content: "";
    position: absolute;
    right: -16px;
    bottom: -16px;
    width: 70%;
    height: 70%;
    background: var(--sb-accent);
    border-radius: 24px;
    z-index: 0;
}

.sb-detail-img img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 24px;
}

.sb-gal-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
}

.sb-gal-head h3 {
    font-size: 28px;
    margin: 0;
    color: var(--sb-ink);
}

.sb-gal-head span {
    font-size: 14px;
    color: #7b867f;
}

.sb-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.sb-tile {
    background: #fff;
    border: 1px solid var(--sb-line);
    border-radius: 18px;
    padding: 8px;
}

.sb-tile .sb-m {
    position: relative;
    height: 230px;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
}

.sb-tile .sb-m img,
.sb-tile .sb-m video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sb-tile .sb-m img {
    transition: transform .5s;
}

.sb-tile:hover .sb-m img {
    transform: scale(1.07);
}

.sb-tile a.image-popup::after {
    content: "\f00e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 42, 34, .45);
    color: #fff;
    font-size: 26px;
    opacity: 0;
    transition: opacity .3s;
}

.sb-tile:hover a.image-popup::after {
    opacity: 1;
}

.sb-tile a.image-popup {
    display: block;
    height: 100%;
}

.sb-kind {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    background: #fff;
    color: var(--sb-ink);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 30px;
}

.sb-kind i {
    color: var(--sb-accent);
    margin-right: 5px;
}

.sb-cap {
    padding: 12px 8px 6px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #4d5a52;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: calc(1.6em * 2 + 18px);
}

.sb-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--sb-line);
}

.sb-pbtn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 40px;
    border: 1.5px solid var(--sb-ink);
    color: var(--sb-ink);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: .3s;
}

.sb-pbtn:hover {
    background: var(--sb-ink);
    color: #fff;
}

.sb-pbtn.solid {
    background: var(--sb-accent);
    border-color: var(--sb-accent);
    color: #fff;
}

.sb-pbtn.solid:hover {
    background: var(--sb-ink);
    border-color: var(--sb-ink);
}

/* ---------- Responsive ---------- */
@media (max-width:991px) {

    .sb-grid,
    .sb-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .sb-head,
    .sb-detail-hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .sb-head h2,
    .sb-detail-hero h2 {
        font-size: 36px;
    }
}

@media (max-width:575px) {

    .sb-grid,
    .sb-gallery {
        grid-template-columns: 1fr;
    }

    .sb-section {
        padding: 60px 0;
    }

    .sb-stats {
        /*flex-wrap: wrap;*/
    }

    .sb-stat {
        flex: 1 1 50%;
        border-bottom: 1px solid var(--sb-line);
    }

    .sb-detail-img img {
        height: 260px;
    }
}






.sg-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.sg-intro h2 {
    font-size: 42px;
    line-height: 1.1;
    color: var(--sb-ink);
    margin: 0 0 10px;
}

.sg-intro p {
    max-width: 620px;
    font-size: 16.5px;
    line-height: 1.8;
    color: #4d5a52;
    margin: 0;
}

.sg-filters {
    display: flex;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--sb-line);
    padding: 6px;
    border-radius: 40px;
}

.sg-filter {
    border: 0;
    background: transparent;
    padding: 9px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    color: var(--sb-ink);
    cursor: pointer;
    transition: .3s;
}

.sg-filter i {
    margin-right: 6px;
}

.sg-filter.active,
.sg-filter:hover {
    background: var(--sb-ink);
    color: #fff;
}

.sg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

/* grid with spans */
.sg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 210px;
    grid-auto-flow: dense;
    gap: 16px;
}

.sg-item {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #111;
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px) scale(.96);
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}

.sg-item.in {
    opacity: 1;
    transform: none;
}

.sg-item.s-big {
    grid-column: span 2;
    grid-row: span 2;
}

.sg-item.s-wide {
    grid-column: span 2;
}

.sg-item.s-tall {
    grid-row: span 2;
}

.sg-item.sg-hide {
    display: none;
}

.sg-item.pop {
    animation: sgPop .55s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes sgPop {
    from {
        opacity: 0;
        transform: scale(.85);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.sg-item img,
.sg-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter .5s;
}

.sg-item:hover img,
.sg-item:hover video {
    transform: scale(1.12);
    filter: brightness(.7);
}

/* hover overlay: text ONLY appears on hover */
.sg-over {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background: linear-gradient(180deg, transparent 35%, rgba(10, 20, 14, .88));
    opacity: 0;
    transition: opacity .4s;
}

.sg-item:hover .sg-over {
    opacity: 1;
}

.sg-over .sg-title {
    color: var(--sb-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transform: translateY(16px);
    opacity: 0;
    transition: .45s .05s;
}

.sg-over .sg-text {
    color: #fff;
    font-size: 15.5px;
    line-height: 1.5;
    margin: 6px 0 0;
    transform: translateY(22px);
    opacity: 0;
    transition: .5s .12s;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sg-item:hover .sg-title,
.sg-item:hover .sg-text {
    transform: none;
    opacity: 1;
}

.sg-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--sb-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transform: scale(0) rotate(-90deg);
    transition: .45s cubic-bezier(.3, 1.6, .5, 1);
}

.sg-item:hover .sg-icon {
    transform: none;
}

.sg-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62px;
    height: 62px;
    margin: -31px 0 0 -31px;
    border-radius: 50%;
    background: var(--sb-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding-left: 4px;
    box-shadow: 0 0 0 0 rgba(217, 83, 30, .6);
    animation: sgPulse 2s infinite;
    transition: transform .3s;
}

.sg-item:hover .sg-play {
    transform: scale(1.15);
}

@keyframes sgPulse {
    70% {
        box-shadow: 0 0 0 18px rgba(217, 83, 30, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217, 83, 30, 0);
    }
}

/* lightbox */
.sg-lb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(8, 14, 10, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: .35s;
}

.sg-lb.open {
    opacity: 1;
    visibility: visible;
}

.sg-stage {
    max-width: min(1100px, 92vw);
    max-height: 78vh;
    display: flex;
    justify-content: center;
}

.sg-stage img,
.sg-stage video {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 14px;
    animation: sgPop .45s both;
}

.sg-lb-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 26px;
    text-align: center;
    color: #fff;
    padding: 0 70px;
    font-size: 16px;
}

.sg-lb-count {
    position: absolute;
    top: 24px;
    left: 28px;
    color: #cfd8d2;
    font-size: 14px;
    letter-spacing: 1px;
}

.sg-lb button {
    position: absolute;
    border: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: .3s;
}

.sg-lb button:hover {
    background: var(--sb-accent);
}

.sg-lb .x {
    top: 18px;
    right: 22px;
}

.sg-lb .p {
    left: 22px;
    top: 50%;
}

.sg-lb .n {
    right: 22px;
    top: 50%;
}

@media (max-width:991px) {
    .sg-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 180px;
    }

    .sg-intro h2 {
        font-size: 34px;
    }
}

@media (max-width:575px) {
    .sg-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
        gap: 10px;
    }

    .sg-item.s-big {
        grid-column: span 2;
    }

    .sg-lb .p {
        left: 8px;
    }

    .sg-lb .n {
        right: 8px;
    }
}