.home-gallery { padding: 70px 0 58px; background: #fffaf8; color: #32272b; overflow: hidden; }
.home-gallery__header { margin-bottom: 34px; text-align: center; }
.home-gallery__eyebrow { color: #ab737e; font-size: 10px; font-weight: 600; letter-spacing: 2.6px; }
.home-gallery__header h3 { margin: 10px 0 8px; font-family: 'PT Serif', Georgia, serif; font-size: 46px; line-height: 1.15; font-weight: 400; }
.home-gallery__header p { margin: 0; color: #85767a; font-size: 13px; }
.home-gallery__track { display: flex; gap: 22px; align-items: center; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding: 8px 0 18px; }
.home-gallery__track::-webkit-scrollbar { display: none; }
.home-gallery__card { position: relative; display: block; flex: 0 0 calc((100% - 44px) / 3); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 12px; background: #eddfda; scroll-snap-align: start; scroll-snap-stop: always; isolation: isolate; }
.home-gallery__card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.home-gallery__card.is-active { outline: 1px solid #c09aa3; outline-offset: 4px; }
.home-gallery__card[href$="photo-9.jpg"],
.home-gallery__card[href$="photo-6.jpg"],
.home-gallery__card[href$="photo-4.jpg"],
.home-gallery__card[href$="photo-8.jpg"],
.home-gallery__card[href$="photo-1.jpg"],
.home-gallery__card[href$="photo-2.jpg"],
.home-gallery__card[href$="photo-3.jpg"] { aspect-ratio: 4 / 3; }
.home-gallery__card::after { position: absolute; inset: 60% 0 0; z-index: 1; content: ''; background: linear-gradient(transparent, rgba(28,15,20,.24)); pointer-events: none; }
.home-gallery__card:hover img { transform: scale(1.025); }
.home-gallery__zoom { position: absolute; right: 14px; top: 14px; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(50,39,43,.12); color: #fff; font-size: 12px; }
.home-gallery__photo-number { position: absolute; left: 18px; bottom: 17px; z-index: 2; color: #fff; font-size: 12px; letter-spacing: 2px; }
.home-gallery__controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.home-gallery__counter { display: flex; align-items: baseline; gap: 8px; min-width: 64px; font-size: 12px; font-variant-numeric: tabular-nums; }
.home-gallery__counter strong { color: #a45566; font-size: 18px; font-weight: 400; }
.home-gallery__counter > span { color: #baa6ac; }
.home-gallery__dots { display: flex; align-items: center; gap: 2px; }
.home-gallery__dot { position: relative; width: 22px; height: 30px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.home-gallery__dot::after { position: absolute; top: 12px; left: 8px; width: 6px; height: 6px; content: ''; border-radius: 8px; background: #dfccd0; transition: width .2s, background .2s; }
.home-gallery__dot.is-active { width: 32px; }
.home-gallery__dot.is-active::after { width: 20px; left: 6px; background: #a45566; }
.home-gallery__arrows { display: flex; gap: 8px; }
.home-gallery__arrow { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #e2cdd2; border-radius: 50%; background: transparent; color: #8f5361; font-size: 23px; cursor: pointer; }
.home-gallery__arrow:hover { background: #a45566; border-color: #a45566; color: #fff; }
.home-gallery__arrow:disabled { opacity: .35; cursor: default; background: transparent; color: #8f5361; }
.home-gallery__hint { margin: 18px 0 0; text-align: center; color: #9a858b; font-size: 11px; letter-spacing: .2px; }
.home-gallery button:focus-visible, .home-gallery a:focus-visible, .home-gallery__viewer:focus-visible { outline: 2px solid #a45566; outline-offset: 3px; }
@media (max-width: 991px) and (min-width: 768px) {
    .home-gallery__track { gap: 18px; }
    .home-gallery__card { flex-basis: calc((100% - 18px) / 2); }
}
@media (min-width: 992px) {
    .home-gallery { padding: 64px 0; background: #fffaf8; }
    .home-gallery__header { margin-bottom: 32px; }
    .home-gallery__track {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-auto-rows: clamp(180px, 16vw, 230px);
        align-items: stretch;
        gap: 16px;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
    }
    .home-gallery__card {
        grid-column: span 4;
        min-width: 0;
        min-height: 0;
        height: 100%;
        border-radius: 7px;
    }
    .home-gallery__card,
    .home-gallery__card[href$=".jpg"] { aspect-ratio: auto; }
    .home-gallery__card.is-active { outline: none; }
    .home-gallery__card[href$="photo-5.jpg"] { order: 1; grid-column: span 3; grid-row: span 2; }
    .home-gallery__card[href$="photo-9.jpg"] { order: 2; grid-column: span 6; grid-row: span 2; }
    .home-gallery__card[href$="photo-1.jpg"] { order: 3; grid-column: span 3; }
    .home-gallery__card[href$="photo-10.jpg"] { order: 4; grid-column: span 3; }
    .home-gallery__card[href$="photo-6.jpg"] { order: 5; }
    .home-gallery__card[href$="photo-4.jpg"] { order: 6; }
    .home-gallery__card[href$="photo-8.jpg"] { order: 7; }
    .home-gallery__card[href$="photo-7.jpg"] { order: 8; }
    .home-gallery__card[href$="photo-2.jpg"] { order: 9; }
    .home-gallery__card[href$="photo-3.jpg"] { order: 10; }
    .home-gallery__card[href$="photo-7.jpg"] img { object-position: 50% 90% !important; }
    .home-gallery__card::after,
    .home-gallery__photo-number,
    .home-gallery__controls,
    .home-gallery__hint { display: none; }
    .home-gallery__zoom { background: rgba(32,20,25,.24); }
}
@media (max-width: 767px) {
    .home-gallery { padding: 38px 0 32px; }
    .home-gallery__header { margin-bottom: 23px; }
    .home-gallery__eyebrow { font-size: 9px; letter-spacing: 2px; }
    .home-gallery__header h3 { font-size: 36px; }
    .home-gallery__header p { font-size: 12px; }
    .home-gallery__track { width: 100vw; margin-left: calc(50% - 50vw); padding: 6px 24px 16px; gap: 14px; scroll-padding-left: 24px; }
    .home-gallery__card { flex-basis: calc(100vw - 78px); border-radius: 12px; }
    .home-gallery__controls { margin-top: 6px; gap: 8px; }
    .home-gallery__counter { gap: 6px; min-width: 52px; font-size: 10px; }
    .home-gallery__counter strong { font-size: 16px; }
    .home-gallery__dots { gap: 0; }
    .home-gallery__dot { width: 16px; }
    .home-gallery__dot::after { left: 5px; width: 5px; height: 5px; }
    .home-gallery__dot.is-active { width: 24px; }
    .home-gallery__dot.is-active::after { width: 15px; left: 4px; }
    .home-gallery__arrows { gap: 5px; }
    .home-gallery__arrow { width: 31px; height: 31px; font-size: 21px; }
    .home-gallery__hint { margin-top: 15px; font-size: 10px; }
}
@media (max-width: 359px) {
    .home-gallery__dot { width: 13px; }
    .home-gallery__dot::after { left: 4px; }
    .home-gallery__dot.is-active { width: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-gallery__card img, .home-gallery__dot::after { transition: none; }
    .home-gallery__card:hover img { transform: none; }
}
