.about-us {
    padding: 100px 0 50px 0;
}

.about-us__wrap {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.about-us__left {
    flex: 1;
    max-width: 525px;
}

.about-us__right {
    flex: 1;
    overflow: visible;
}

/* Глобальні стилі тільки для звичайних зображень */
.about-us__right img:not(.stacked-image) {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.about-us__title {
    display: inline-block;
    font-weight: 400;
    font-size: 64px;
    margin: 0 0 30px 0;
}

.about-us__desc {
    display: inline-block;
    line-height: 1.4;
    font-weight: 400;
    font-size: 18px;
    margin-bottom: 50px;
}

.about-us__features {
    display: flex;
    flex-direction: column;
    gap: 20px;

}

.about-us__feature {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    cursor: pointer;
    border-top: 1px solid #ccc;
    padding-top: 20px;
}

.about-us__feature:first-child {
    border-top: none;
    padding-top: 0;
}

.about-us__feature-title {
    display: inline-block;
    font-weight: 500;
    font-size: 18px;
    margin: 0 0 15px 0;
    transition: all 0.6s ease;
    color: rgba(0, 0, 0, 1);
}

.about-us__feature-title:hover {
    opacity: 0.6;
}

.about-us__feature-title.active {
    margin-left: auto;
    color: #005B41;
}

.about-us__feature-desc {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.about-us__logo {
    margin: 30px 0 0;
}

.about-us__feature-title-line {
    display: inline-block;
    margin-left: 20px;
    width: 0;
    overflow: hidden;
    height: 2px;
    background-color: #232D3F;
    transition: width 0.6s;
}

.about-us__feature-title.active .about-us__feature-title-line {
    width: 50px;
}

/* ========== STACKED EFFECT ========== */
.stacked-images {
    position: relative;
    width: 100%;
    max-width: 500px;

    margin: 0 auto;
    perspective: 500px;
    perspective-origin: center;
}

.stacked-image {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition:
        top 0.5s ease,
        left 0.5s ease,
        opacity 0.5s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Тіні (початкове розташування) */
.shadow1 {
    top: 10px;
    left: 10px;
    opacity: 0.7;
    z-index: 1;
}

.shadow2 {
    top: 20px;
    left: 20px;
    opacity: 0.4;
    z-index: 0;
}

/* Основне зображення (верхнє) */
.main {
    position: relative;
    z-index: 2;
    transform-origin: center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform 0.6s ease, opacity 0.4s ease;
}

/* Ефект повороту */
.main.flipping-out {
    transform: rotateY(180deg) scale(0.96);
    opacity: 0;
}

.main.flipping-in {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
}

/* Ефект збирання (в стопку) */
.stacked-image.is-collapsing {
    top: 0 !important;
    left: 0 !important;
    opacity: 1 !important;
    transform: scale(0.96);
}

/* Розгортання тіней */
.stacked-image.is-expanding.shadow1 {
    top: 10px !important;
    left: 10px !important;
    opacity: 0.7;
}

.stacked-image.is-expanding.shadow2 {
    top: 20px !important;
    left: 20px !important;
    opacity: 0.4;
}

#about-us__right {
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.2s ease;
  will-change: transform;
  overflow: hidden;
  border-radius: 10px;
}

#about-us__right::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
  background: radial-gradient(
    circle at var(--light-x, 50%) var(--light-y, 50%),
    rgba(255,255,255,0.15) 0%,
    rgba(0,0,0,0.35) 100%
  );
  transition: background 0.2s ease;
}

@media only screen and (max-width: 1024px) {
    .stacked-images {
        aspect-ratio: auto;
    }
    .shadow1,
    .shadow2 {
        display: none;
    }

    .about-us {
        padding: 60px 0 30px;
    }

    .about-us__title {
        font-size: 32px;
    }

    .about-us__wrap {
        flex-direction: column;
    }

    .stacked-images {
        max-width: 100%;
        height: auto;
        overflow: hidden;
    }

    .stacked-image.is-collapsing {
        height: 100%;
        object-fit: cover;
    }
}

@media only screen and (max-width: 768px) {
    .about-us__logo img {
        width: 150px;
        height: 45px;
    }

    .about-us__download-border {
        height:0;
    }
}