.brand-installation {
    background-color: #E5E5EA;
    padding-bottom: 150px;
}

.brand-installation__hero {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.brand-installation__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    animation: zoomOut 6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    transform-origin: center center;
}

@keyframes zoomOut {
    from {
        transform: scale(1.05);
    }
    to {
        transform: scale(1);
    }
}

.brand-installation__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(40px, 8.33vw, 120px);
    margin-top: -195px;
    position: relative;
    z-index: 10;
}

.brand-installation__slider {
    display: contents;
}

.brand-installation__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.installation-grid__item {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #E5E5EA;
}

.installation-grid__item--box {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: color-mix(in srgb, var(--item-bg, #000) 80%, transparent);
    box-sizing: border-box;
}

.installation-grid__item--content {
    display: flex;
    align-content: center;
    background-color: color-mix(in srgb, var(--item-bg, #000) 80%, transparent);
    position: relative;
    overflow: hidden;
    padding: 75px 0;
    box-sizing: border-box;
    aspect-ratio: auto;
}

.installation-item__text {
    padding: 0 clamp(15px, 4vw, 60px) 0 clamp(25px, 5vw, 72px);
    position: relative;
}

.installation-item__text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 100%;
    background-color: var(--brand-color, #FFD700);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.6s ease-out 0.4s;
}

.installation-grid__item--content.animate .installation-item__text::before {
    transform: scaleY(1);
}

.installation-item__title {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--item-text, #FFFFFF);
    margin: 0 0 30px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease-out 0.7s, transform 0.5s ease-out 0.7s;
}

.installation-grid__item--content.animate .installation-item__title {
    opacity: 1;
    transform: translateX(0);
}

.installation-item__description {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: var(--item-text, #FFFFFF);
    margin: 0;
    text-align: justify;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease-out 0.9s, transform 0.5s ease-out 0.9s;
}

.installation-grid__item--content.animate .installation-item__description {
    opacity: 1;
    transform: translateX(0);
}

.brand-installation__nav {
    display: none;
}

@media (max-width: 1025px) and (min-width: 768px) {
    .brand-installation {
        padding-bottom: 120px;
    }

    .brand-installation__container {
        max-width: none;
        padding: 0 30px;
        margin-top: -90px;
    }

    .brand-installation__grid {
        display: flex;
        flex-direction: row;
        gap: 0;
        align-items: stretch;
    }

    .installation-grid__item--box {
        flex: 0 0 290px ;
        width: 290px;
        height: auto;
        aspect-ratio: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .brand-installation__slider {
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 21px;
        background-color: color-mix(in srgb, var(--item-bg, #000) 80%, transparent);
    }

    .installation-grid__item {
        width: 100%;
        height: auto;
        aspect-ratio: auto;
        max-width: none;
    }

    .installation-grid__item--content {
        flex-shrink: 0;
        background-color: transparent;
        padding: 0;
    }

    .installation-grid__item--content:first-child {
        padding-top: 30px;
    }

    .installation-grid__item--content:last-child {
        padding-bottom: 30px;
    }

    .installation-item__text {
        padding: 0 25px 0 30px;
    }

    .installation-item__text::before {
        width: 7px;
    }

    .installation-item__title {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 10px;
        word-break: break-all;
        text-wrap: wrap;
    }

    .installation-item__description {
        font-size: 13px;
        font-weight: 400;
        word-break: break-all;
        text-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .brand-installation {
        padding-bottom: 100px;
        background-color: #E5E5EA;
    }

    /* 8a: Portrait hero image */
    .brand-installation__hero {
        height: auto;
        aspect-ratio: 3 / 4;
    }

    .brand-installation__container {
        padding: 0px 1rem;
        margin-top: -140px;
    }

    .brand-installation__grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: center;
        background-color: color-mix(in srgb, var(--item-bg, #000) 80%, transparent);
    }

    .installation-grid__item {
        width: 100%;
        height: auto;
        aspect-ratio: auto;
    }

    /* 8b: Transparent box backgrounds — single bg on container, none on children */
    .installation-grid__item--box {
        width: 100%;
        align-items: unset;
        justify-content: unset;
        padding: 50px 15px;
        margin-bottom: 0;
        background-color: transparent;
    }

    /* 8c: Swipeable slider */
    .brand-installation__slider {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
    }

    .brand-installation__slider::-webkit-scrollbar {
        display: none;
    }

    .installation-grid__item--content {
        display: flex;
        min-width: 100%;
        flex-shrink: 0;
        scroll-snap-align: start;
        background-color: transparent;
        padding: 25px 15px 50px;
        box-sizing: border-box;
    }

    .installation-item__text {
        text-align: left;
        text-wrap: wrap;
        padding: 0 0 0 29px;
        align-self: flex-start;
    }

    .installation-grid__item--content[data-no-animate] .installation-item__text::before,
    .installation-grid__item--content[data-no-animate] .installation-item__title,
    .installation-grid__item--content[data-no-animate] .installation-item__description {
        transition: none;
    }

    .installation-item__text::before {
        width: 9px;
    }

    .installation-item__title {
        font-size: 15px;
        font-weight: 600;
        line-height: 27px;
        margin-bottom: 30px;
        word-break: break-all;
        text-wrap: wrap;
    }

    .installation-item__description {
        font-size: 13px;
        line-height: 24px;
        font-weight: 400;
        word-break: break-all;
        text-wrap: wrap;
    }

    .brand-installation__nav {
        width: 100%;
        display: flex;
        justify-content: end;
        gap: 10px;
        background-color: transparent;
        padding: 0 60px 50px 30px;
        position: relative;
    }

    .installation-nav__btn {
        background: transparent;
        border: none;
        color: var(--brand-color, #FFD700);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .installation-nav__btn--prev {
        transform: rotate(180deg);
    }

    .installation-nav__btn svg {
        width: 25px;
        height: auto;
    }

    .installation-nav__btn:disabled {
        opacity: 0.3;
        color: #FFFFFF;
    }
}
