/* SECTION 3 */
@keyframes slideBar {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

@keyframes slideText {
    0% { 
        transform: translateX(-100%);
        opacity: 0;
    }
    10%, 30% {
        transform: translateX(0);
        opacity: 1;
    }
    30%, 100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.slide-bar {
    transform-origin: left;
    animation: slideBar 4s ease-out infinite;
}

.slide-text {
    opacity: 0;
    animation: slideText 20s ease-in-out infinite;
}

/* Adjusted delays for 4-second cycle */
.delay-1 { animation-delay: 0s; }
.delay-2 { animation-delay: 4s; }
.delay-3 { animation-delay: 8s; }
.delay-4 { animation-delay: 12s; }
.delay-5 { animation-delay: 16s; }

/* SECTION 4 */
.carousel-container {
    perspective: 2000px;
    position: relative;
    z-index: 1;
}

.carousel-track {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 2;
}

.card {
    position: absolute;
    width: 400px;
    height: 550px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transform-origin: center;
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    will-change: transform; 
}

.card.center {
    transform: translateZ(0) scale(1);
    z-index: 5;
}

.card.left {
    transform: translateX(-50%) translateZ(-200px) rotateY(25deg);
    z-index: 4;
    opacity: 0.8;
}

.card.right {
    transform: translateX(50%) translateZ(-200px) rotateY(-25deg);
    z-index: 3;
    opacity: 0.8;
}

.card.far-left {
    transform: translateX(-100%) translateZ(-400px) rotateY(35deg);
    z-index: 1;
    opacity: 0.6;
}

.card.far-right {
    transform: translateX(100%) translateZ(-400px) rotateY(-35deg);
    z-index: 1;
    opacity: 0.6;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;     
    line-height: 1;     
    padding-bottom: 10px; 
}

.nav-arrow:hover{
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow.left{
    left: 20px;
}

.nav-arrow.right{
    right: 20px;
}

@media (max-width: 768px) {

.card {
    position: absolute;
    width: 300px;
    height: 400px;
}
}