/* Apple-style карусель */

/* Секция */
.apple-carousel-section {
    border-radius: 0;
    background: #F5F5F7;
    padding-bottom: 60px;
}

/* Галерея */
.apple-gallery {
    position: relative;
    z-index: 1;
    margin: 0;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Обёртка для hover scale */
.apple-scroll-wrapper {
    overflow: visible;
    padding: 10px 0;
    margin: -10px 0;
}

/* Scroll container */
.apple-scroll-container {
    --viewport-inline-padding: max(calc((100vw - 1500px) / 2 + 20px), 20px);
    display: grid;
    overflow-x: scroll;
    overflow-y: visible;
    padding-bottom: 28px;
    scroll-padding: var(--viewport-inline-padding);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.apple-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Список карточек */
.apple-item-container {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 12px var(--viewport-inline-padding);
    margin: 0;
    width: fit-content;
    align-items: stretch;
}

@media (max-width: 734px) {
    .apple-item-container {
        gap: 12px;
    }
}

/* Элемент списка */
.apple-gallery-item {
    list-style: none;
    scroll-snap-align: start;
}

/* Анимация */
.apple-animation-wrapper {
    position: relative;
    height: 100%;
}

.apple-animation-wrapper.hidden {
    opacity: 0;
    transform: translateY(20px);
}

.apple-animation-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Staggered delays */
.apple-gallery-item:nth-child(1) .apple-animation-wrapper.visible { transition-delay: 0s; }
.apple-gallery-item:nth-child(2) .apple-animation-wrapper.visible { transition-delay: 0.1s; }
.apple-gallery-item:nth-child(3) .apple-animation-wrapper.visible { transition-delay: 0.2s; }
.apple-gallery-item:nth-child(4) .apple-animation-wrapper.visible { transition-delay: 0.3s; }
.apple-gallery-item:nth-child(5) .apple-animation-wrapper.visible { transition-delay: 0.4s; }
.apple-gallery-item:nth-child(6) .apple-animation-wrapper.visible { transition-delay: 0.5s; }
.apple-gallery-item:nth-child(7) .apple-animation-wrapper.visible { transition-delay: 0.6s; }

/* Карточка */
.apple-feature-card {
    --card-width: 372px;
    --card-height: 544px;
    --scale-percent: 1.016;
    width: var(--card-width);
    height: var(--card-height);
    position: relative;
    z-index: 1;
    border-radius: 28px;
    background: var(--color-white, #fff);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0, 0, 0.5, 1);
    outline: solid 1px transparent;
    overflow: hidden;
}

.apple-feature-card:hover {
    transform: scale(var(--scale-percent));
}

@media (max-width: 1068px) {
    .apple-feature-card {
        --card-width: 344px;
        --card-height: 500px;
        --scale-percent: 1.017;
        border-radius: 24px;
    }
}

@media (max-width: 734px) {
    .apple-feature-card {
        --card-width: 320px;   /* было 260px, +23% */
        --card-height: 468px;  /* было 400px, ratio 1:1.46 как desktop */
        --scale-percent: 1.023;
        border-radius: 20px;
    }
}

/* Контент карточки */
.apple-card-content {
    padding: 30px 30px 0 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.apple-topic-label {
    font-family: 'Roboto', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-black, #000);
    margin: 0 0 8px 0;
}

.apple-headline {
    font-family: 'Roboto', sans-serif;
    font-size: 25px;
    font-weight: 700;
    color: var(--color-text-black, #000);
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.apple-text {
    font-family: 'Roboto', sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: var(--color-text-black, #000);
    margin: 0;
    line-height: 1.4;
}

.apple-text a {
    color: var(--color-blue, #2997FF);
    text-decoration: none;
    font-weight: bold;
}

.apple-text a:hover {
    text-decoration: underline;
}

/* Картинка */
.apple-card-image {
    margin-top: auto;
    width: 100%;
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
}

.apple-card-image img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
}

.apple-gallery-item:nth-child(1) .apple-card-image,
.apple-gallery-item:nth-child(2) .apple-card-image,
.apple-gallery-item:nth-child(4) .apple-card-image,
.apple-gallery-item:nth-child(7) .apple-card-image {
    align-items: center;
    justify-content: center;
}

/* Кликабельная область */
.apple-card-link-full {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

/* Навигация */
.apple-paddle-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.apple-paddle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    width: 36px;
    min-height: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background 0.2s ease;
    color: #1d1d1f;
    flex-shrink: 0;
    padding: 0;
}

.apple-paddle-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.15);
}

.apple-paddle-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.apple-paddle-btn svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

