.home-gallery-trigger {
    display: block;
}

.home-calculator-card {
    border: 1px solid #dfe7dc !important;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(31, 42, 31, 0.08), 0 3px 10px rgba(31, 42, 31, 0.04) !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.home-calculator-card:hover,
.home-calculator-card:focus-within {
    transform: translateY(-4px);
    border-color: #bfd0b9 !important;
    box-shadow: 0 20px 40px rgba(31, 42, 31, 0.12), 0 6px 16px rgba(31, 42, 31, 0.06) !important;
}

.home-calculator-card .card-body {
    position: relative;
}

.home-gallery-trigger:focus {
    outline: none;
}

.home-gallery-trigger .card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.home-gallery-trigger:hover .card,
.home-gallery-trigger:focus .card {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.14) !important;
}

.home-gallery-trigger .testimonial-image {
    height: 280px;
    object-fit: cover;
    transition: transform 0.28s ease;
}

.home-gallery-trigger:hover .testimonial-image,
.home-gallery-trigger:focus .testimonial-image {
    transform: scale(1.04);
}

.home-gallery-trigger .testimonial-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 15%, rgba(0, 0, 0, 0.72) 100%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.home-gallery-trigger:hover .testimonial-overlay,
.home-gallery-trigger:focus .testimonial-overlay {
    opacity: 1;
}

.testimonial-overlay-copy {
    display: inline-block;
    margin: 0 0 1rem 1rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1f2a1f;
    font-size: 0.84rem;
    font-weight: 700;
}

.home-gallery-viewer[hidden] {
    display: none !important;
}

.home-gallery-viewer {
    position: fixed;
    inset: 0;
    z-index: 1080;
}

.home-gallery-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 18, 16, 0.82);
}

.home-gallery-viewer__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1100px;
    height: 100%;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.home-gallery-viewer__close,
.home-gallery-viewer__nav {
    border: 0;
    background: rgba(255, 255, 255, 0.94);
    color: #1f2a1f;
    cursor: pointer;
}

.home-gallery-viewer__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
}

.home-gallery-viewer__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    background: transparent;
}

.home-gallery-viewer__image {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    border-radius: 18px;
    object-fit: contain;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
}

.home-gallery-viewer__nav {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    line-height: 1;
}

.home-gallery-viewer__nav--prev {
    left: 0;
}

.home-gallery-viewer__nav--next {
    right: 0;
}

.home-gallery-viewer__footer {
    margin-top: 1rem;
    padding: 0 0.25rem;
    color: #fff;
}

.home-gallery-viewer__title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.home-gallery-viewer__counter {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

body.home-gallery-open {
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .home-gallery-trigger .testimonial-image {
        height: 220px;
    }

    .home-gallery-viewer__dialog {
        padding: 1rem 0.5rem 1.25rem;
    }

    .home-gallery-viewer__close {
        top: 0.5rem;
        right: 0.5rem;
        width: 44px;
        height: 44px;
    }

    .home-gallery-viewer__nav {
        width: 44px;
        height: 44px;
        font-size: 1.7rem;
    }

    .home-gallery-viewer__nav--prev {
        left: 0.25rem;
    }

    .home-gallery-viewer__nav--next {
        right: 0.25rem;
    }

    .home-gallery-viewer__image {
        max-height: calc(100vh - 150px);
        border-radius: 14px;
    }
}
