/* BitMetall Gallery Next v2 visual polish */
.bmg,
.bmg * {
    box-sizing: border-box;
}

.bmg {
    --bmg-ink: #173533;
    --bmg-muted: #61706f;
    --bmg-line: rgba(23, 53, 51, .13);
    --bmg-soft: #f4f7f6;
    --bmg-accent: #e79a22;
    --bmg-accent-dark: #bf7410;
    --bmg-radius: 22px;
    width: 100%;
    padding: 34px 0 72px;
    color: var(--bmg-ink);
    font-family: Arial, Helvetica, sans-serif;
}

.bmg img {
    max-width: 100%;
}

.bmg-shell {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
}

.bmg-hero {
    max-width: 860px;
    margin: 0 auto 38px;
    text-align: center;
}

.bmg-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--bmg-accent-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.bmg-hero h1,
.bmg-album-head h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: -.035em;
    color: var(--bmg-ink);
}

.bmg-hero p {
    max-width: 680px;
    margin: 18px auto 0;
    color: var(--bmg-muted);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.55;
}

.bmg-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin: 0 0 54px;
}

.bmg-sections a,
.bmg-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid var(--bmg-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bmg-ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.bmg-sections a:hover,
.bmg-back:hover {
    border-color: rgba(231, 154, 34, .55);
    color: var(--bmg-accent-dark);
}

.bmg-group {
    scroll-margin-top: 20px;
    margin: 0 0 66px;
}

.bmg-group__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bmg-line);
}

.bmg-group__head h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.1;
    letter-spacing: -.025em;
}

.bmg-group__count {
    flex: 0 0 auto;
    color: var(--bmg-muted);
    font-size: 14px;
    font-weight: 700;
}

.bmg-albums {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.bmg-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--bmg-line);
    border-radius: var(--bmg-radius);
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(25, 58, 55, .07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.bmg-card:hover {
    transform: translateY(-4px);
    border-color: rgba(231, 154, 34, .42);
    box-shadow: 0 15px 38px rgba(25, 58, 55, .13);
}

.bmg-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bmg-soft);
}

.bmg-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.bmg-card:hover .bmg-card__media img {
    transform: scale(1.035);
}

.bmg-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(23,53,51,.05), rgba(231,154,34,.11));
}

.bmg-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 19px 20px;
}

.bmg-card__body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.28;
    letter-spacing: -.012em;
}

.bmg-card__body p {
    margin: 7px 0 0;
    color: var(--bmg-muted);
    font-size: 13px;
}

.bmg-card__arrow {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--bmg-soft);
    color: var(--bmg-accent-dark);
    font-size: 20px;
    transition: transform .2s ease;
}

.bmg-card:hover .bmg-card__arrow {
    transform: translateX(3px);
}

.bmg-back {
    margin-bottom: 22px;
}

.bmg-album-head {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    margin-bottom: 30px;
    padding: 28px 32px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 92% 5%, rgba(231,154,34,.12), transparent 30%),
        var(--bmg-soft);
}

.bmg-album-head h1 {
    font-size: clamp(30px, 4vw, 48px);
}

.bmg-album-head__count {
    margin: 12px 0 0;
    color: var(--bmg-muted);
    font-weight: 700;
}

.bmg-album-head__description {
    align-self: center;
}

.bmg-album-head__description p {
    margin: 0;
    color: #425654;
    font-size: 16px;
    line-height: 1.62;
}

.bmg-photo-wall {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.bmg-photo {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: var(--bmg-soft);
    cursor: zoom-in;
    box-shadow: 0 5px 18px rgba(25,58,55,.06);
}

.bmg-photo img {
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
    transition: transform .28s ease;
}

.bmg-photo:hover img {
    transform: scale(1.025);
}

/* When there are only one or two photographs, don't stretch them into a huge wall. */
.bmg-photo-wall:has(.bmg-photo:nth-child(1):last-child) {
    grid-template-columns: minmax(0, 720px);
    justify-content: start;
}

.bmg-photo-wall:has(.bmg-photo:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 420px));
    justify-content: start;
}

.bmg-empty {
    max-width: 760px;
    margin: 40px auto;
    padding: 34px;
    border-radius: 22px;
    background: var(--bmg-soft);
    text-align: center;
}

.bmg-empty h1,
.bmg-empty h2 {
    margin: 0 0 12px;
}

.bmg-viewer[hidden] {
    display: none;
}

.bmg-viewer {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.bmg-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 14, 14, .95);
    backdrop-filter: blur(10px);
}

.bmg-viewer__panel {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    grid-template-rows: 56px minmax(0, 1fr) auto;
    align-items: center;
    color: #fff;
}

.bmg-viewer__top {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 16px;
}

.bmg-viewer__counter {
    font-weight: 700;
}

.bmg-viewer__close,
.bmg-viewer__nav {
    border: 0;
    color: #fff;
    background: rgba(255,255,255,.1);
    cursor: pointer;
}

.bmg-viewer__close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 29px;
    line-height: 1;
}

.bmg-viewer__nav {
    z-index: 2;
    width: 46px;
    height: 62px;
    justify-self: center;
    border-radius: 15px;
    font-size: 40px;
}

.bmg-viewer__stage {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    touch-action: pan-y;
}

.bmg-viewer__image {
    display: block;
    max-width: min(100%, calc(100vw - 150px));
    max-height: calc(100vh - 112px);
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.bmg-viewer__caption {
    grid-column: 1 / -1;
    grid-row: 3;
    max-width: 960px;
    margin: 0 auto;
    padding: 8px 24px 14px;
    color: rgba(255,255,255,.82);
    text-align: center;
    line-height: 1.4;
}

body.bmg-viewer-open {
    overflow: hidden;
}

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

    .bmg-album-head {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .bmg-photo-wall {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bmg-photo-wall:has(.bmg-photo:nth-child(1):last-child) {
        grid-template-columns: minmax(0, 680px);
    }

    .bmg-photo-wall:has(.bmg-photo:nth-child(2):last-child) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .bmg {
        padding-top: 22px;
    }

    .bmg-shell {
        width: min(100% - 20px, 1220px);
    }

    .bmg-hero {
        margin-bottom: 26px;
    }

    .bmg-sections {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-bottom: 38px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .bmg-sections::-webkit-scrollbar {
        display: none;
    }

    .bmg-sections a {
        flex: 0 0 auto;
    }

    .bmg-group {
        margin-bottom: 48px;
    }

    .bmg-group__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .bmg-albums {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bmg-card__body {
        padding: 15px 16px 17px;
    }

    .bmg-album-head {
        gap: 18px;
        margin-bottom: 18px;
        padding: 20px 17px;
        border-radius: 19px;
    }

    .bmg-photo-wall,
    .bmg-photo-wall:has(.bmg-photo:nth-child(1):last-child),
    .bmg-photo-wall:has(.bmg-photo:nth-child(2):last-child) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .bmg-photo {
        border-radius: 10px;
    }

    .bmg-viewer__panel {
        grid-template-columns: 0 minmax(0, 1fr) 0;
        grid-template-rows: 52px minmax(0, 1fr) auto;
    }

    .bmg-viewer__image {
        max-width: calc(100vw - 12px);
        max-height: calc(100vh - 92px);
    }

    .bmg-viewer__nav {
        position: absolute;
        top: 50%;
        width: 40px;
        height: 56px;
        transform: translateY(-50%);
        background: rgba(0,0,0,.36);
    }

    .bmg-viewer__nav--prev {
        left: 5px;
    }

    .bmg-viewer__nav--next {
        right: 5px;
    }

    .bmg-viewer__caption {
        padding: 6px 12px 10px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .bmg-photo-wall,
    .bmg-photo-wall:has(.bmg-photo:nth-child(1):last-child),
    .bmg-photo-wall:has(.bmg-photo:nth-child(2):last-child) {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bmg-card,
    .bmg-card__media img,
    .bmg-card__arrow,
    .bmg-photo img {
        transition: none;
    }
}
/* BitMetall Gallery Next v5 mobile navigation polish */

/*
 * v5:
 * - no special spacing for floating WhatsApp;
 * - mobile gallery section navigation wraps into visible rows instead of horizontal scrolling;
 * - keeps two album cards per row.
 */

@media (max-width: 620px) {
    .bmg {
        padding-bottom: 72px;
    }

    .bmg-sections {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
        overflow: visible;
        margin-bottom: 34px;
        padding-bottom: 0;
    }

    .bmg-sections a {
        flex: 0 1 auto;
        min-height: 38px;
        padding: 7px 12px;
        font-size: 13px;
        line-height: 1.2;
        white-space: normal;
    }

    .bmg-albums {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}
/* BitMetall Gallery Next v6 mobile horizontal album cards */

@media (max-width: 620px) {
    .bmg-albums {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .bmg-card {
        display: grid;
        grid-template-columns: minmax(128px, 42%) minmax(0, 1fr);
        min-height: 142px;
        border-radius: 17px;
    }

    .bmg-card__media {
        aspect-ratio: auto;
        min-height: 142px;
        height: 100%;
        border-radius: 0;
    }

    .bmg-card__media img {
        width: 100%;
        height: 100%;
        min-height: 142px;
        object-fit: cover;
    }

    .bmg-card__body {
        display: flex;
        min-width: 0;
        height: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 14px 12px 14px 15px;
    }

    .bmg-card__body > div {
        min-width: 0;
    }

    .bmg-card__body h3 {
        margin: 0;
        color: var(--bmg-ink) !important;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.28;
        letter-spacing: -.01em;
        text-decoration: none !important;
        overflow-wrap: anywhere;
    }

    .bmg-card__body p {
        margin: 8px 0 0;
        color: var(--bmg-muted) !important;
        font-size: 12px;
        line-height: 1.25;
        text-decoration: none !important;
    }

    .bmg-card__arrow {
        display: grid;
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        place-items: center;
        border-radius: 50%;
        font-size: 17px;
    }
}

@media (max-width: 380px) {
    .bmg-card {
        grid-template-columns: minmax(116px, 40%) minmax(0, 1fr);
        min-height: 132px;
    }

    .bmg-card__media,
    .bmg-card__media img {
        min-height: 132px;
    }

    .bmg-card__body {
        padding: 12px 10px 12px 12px;
    }

    .bmg-card__body h3 {
        font-size: 14px;
    }

    .bmg-card__arrow {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
        font-size: 15px;
    }
}
/* BitMetall Gallery Next v7 compact mobile section selector */

.bmg-section-select {
    display: none;
}

@media (max-width: 620px) {
    .bmg-sections {
        display: none;
    }

    .bmg-section-select {
        display: block;
        margin: 0 0 30px;
    }

    .bmg-section-select label {
        display: block;
        margin: 0 0 7px;
        color: var(--bmg-muted);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .04em;
    }

    .bmg-section-select select {
        display: block;
        width: 100%;
        min-height: 46px;
        margin: 0;
        padding: 10px 42px 10px 14px;
        border: 1px solid var(--bmg-line);
        border-radius: 14px;
        outline: none;
        background: #fff;
        color: var(--bmg-ink);
        font: inherit;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.25;
    }

    .bmg-section-select select:focus {
        border-color: rgba(231, 154, 34, .7);
    }
}
/* BitMetall Gallery Next v8 hero/select compact polish */

.bmg-hero {
    margin-bottom: 30px;
}

.bmg-section-select {
    margin: 0 0 18px;
}

@media (max-width: 620px) {
    .bmg-hero {
        margin-bottom: 16px;
    }

    .bmg-hero p {
        margin-top: 12px;
    }

    .bmg-section-select {
        margin: 0 0 14px;
    }

    .bmg-section-select select {
        min-height: 42px;
        padding: 8px 40px 8px 14px;
        border-radius: 13px;
        font-size: 14px;
    }

    .bmg-group__head {
        margin-bottom: 14px;
    }
}
/* BitMetall Gallery Next v9 remove group eyebrow and tighten spacing */

.bmg-section-select {
    margin: 0 0 12px;
}

.bmg-group__head {
    margin-bottom: 18px;
}

@media (max-width: 620px) {
    .bmg-section-select {
        margin: 0 0 8px;
    }

    .bmg-group__head {
        margin-bottom: 12px;
    }
}
/* BitMetall Gallery Next v10 align select bottom spacing with top spacing */

.bmg-section-select {
    margin: 0 0 16px;
}

@media (max-width: 620px) {
    .bmg-section-select {
        margin: 0 0 16px;
    }
}
/* BitMetall Gallery Next v11 lock album-card link states */

.bmg .bmg-card,
.bmg .bmg-card:link,
.bmg .bmg-card:visited,
.bmg .bmg-card:hover,
.bmg .bmg-card:focus,
.bmg .bmg-card:focus-visible,
.bmg .bmg-card:active {
    color: var(--bmg-ink) !important;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}

.bmg .bmg-card h3,
.bmg .bmg-card:link h3,
.bmg .bmg-card:visited h3,
.bmg .bmg-card:hover h3,
.bmg .bmg-card:focus h3,
.bmg .bmg-card:focus-visible h3,
.bmg .bmg-card:active h3 {
    color: var(--bmg-ink) !important;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}

.bmg .bmg-card p,
.bmg .bmg-card:link p,
.bmg .bmg-card:visited p,
.bmg .bmg-card:hover p,
.bmg .bmg-card:focus p,
.bmg .bmg-card:focus-visible p,
.bmg .bmg-card:active p {
    color: var(--bmg-muted) !important;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}

.bmg .bmg-card__arrow,
.bmg .bmg-card:link .bmg-card__arrow,
.bmg .bmg-card:visited .bmg-card__arrow,
.bmg .bmg-card:hover .bmg-card__arrow,
.bmg .bmg-card:focus .bmg-card__arrow,
.bmg .bmg-card:focus-visible .bmg-card__arrow,
.bmg .bmg-card:active .bmg-card__arrow {
    color: var(--bmg-accent-dark) !important;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}
