.scgh-gallery {
    --scgh-gap: 24px;
}

.scgh-grid {
    display: grid;
    grid-template-columns: repeat(var(--scgh-columns, 3), minmax(0, 1fr));
    gap: var(--scgh-gap);
}

.scgh-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.scgh-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.scgh-thumb {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #7f1d1d 100%);
}

.scgh-thumb img,
.scgh-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: block;
}

.scgh-thumb img {
    object-fit: cover;
}

.scgh-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.92);
    padding: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}

.scgh-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(17,24,39,.75);
    color: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.scgh-content {
    padding: 20px;
}

.scgh-content h3 {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.45;
    color: #111827;
}

.scgh-content p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.8;
    color: #4b5563;
}

.scgh-open {
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(185, 28, 28, 0.22);
}

.scgh-empty {
    padding: 18px 20px;
    border-radius: 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.scgh-modal[hidden] {
    display: none !important;
}

.scgh-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.scgh-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
}

.scgh-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    background: #0b1220;
    color: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,.4);
}

.scgh-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.scgh-modal-body {
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.scgh-modal-body img {
    display: block;
    width: 100%;
    height: auto;
}

.scgh-responsive-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.scgh-responsive-video iframe,
.scgh-modal-body iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 1024px) {
    .scgh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .scgh-grid {
        grid-template-columns: 1fr;
    }

    .scgh-content h3 {
        font-size: 20px;
    }
}
