/* Transition effects for morphic animation */
.morphing-element {
    transition: all 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    font-family: 'Poppins', sans-serif;
}

.animated-logo-transition {
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    font-family: 'Poppins', sans-serif;
}

.animated-logo-transition img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.transition-loading-screen {
    pointer-events: none;
}

/* Add this to your existing styles.css file */
.target-logo-position {
    pointer-events: none;
}

.loading-overlay {
    pointer-events: none;
}

/* Improved animation for the logo morphing */
@keyframes morphToNavLogo {
    0% {
        transform: scale(1);
        top: 40vh;
        left: 50%;
        width: 200px;
        height: 60vh;
    }
    50% {
        transform: scale(0.6);
        top: 25vh;
        left: 50%;
        width: 180px;
        height: 180px;
    }
    100% {
        transform: scale(0.3);
        top: 20px;
        left: 50px;
        width: 150px;
        height: 50px;
    }
}

/* Animation for fading elements */
@keyframes fadeOutSlow {
    0% { opacity: 1; }
    70% { opacity: 0.7; }
    100% { opacity: 0; }
}

/* Animation for shrinking tires */
@keyframes shrinkTires {
    0% { 
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    100% { 
        transform: scale(0) translateY(20px);
        opacity: 0;
    }
}

/* Animation for shrinking text */
@keyframes shrinkText {
    0% { 
        font-size: 100%; 
        opacity: 1;
        transform: translateY(0);
    }
    100% { 
        font-size: 0; 
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Animation for the truck text */
@keyframes truckTextShrink {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Classes for the animations */
.morphing {
    animation: morphToNavLogo 1.5s cubic-bezier(0.39, 0.575, 0.565, 1) forwards;
}

.fading-out {
    animation: fadeOutSlow 1s forwards;
}

.shrinking-tires {
    animation: shrinkTires 0.8s forwards;
}

.shrinking-text {
    animation: shrinkText 0.8s forwards;
}

.truck-text-shrink {
    animation: truckTextShrink 0.8s forwards;
}

/* Preserve the ek text during transition */
.preserve-ek {
    transform-origin: center;
    transition: all 1s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* Smooth transition for the logo in index.html */
.smooth-logo-transition {
    transition: opacity 0.5s ease;
}

/* Container for the morphing logo */
.morphing-logo-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
    font-family: 'Poppins', sans-serif;
}

/* Styles for the logo content that will morph */
.morphing-logo-content {
    background-color: #ff0000;
    width: 200px;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

/* Style for the ek text that will be preserved */
.morphing-ek-text {
    color: white;
    font-size: 60px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: -0.5px;
}

/* Add styles for the skip button */
.skip-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    /* background: rgba(255, 0, 0, 0.7);
    color: white; */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 999;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.skip-button:hover {
    background: rgba(255, 0, 0, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Styles for the tagline */
.ektruck-tagline {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Styles for the changing text */
.changing-text, .truck-text {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600;
}

/* Transition effects for page elements 
   ========================================================================== */
   
.page-transition {
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
}

.page-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-exit-active {
    opacity: 0;
    transform: translateY(-20px);
}

/* Element transitions */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Staggered animations for multiple elements */
.stagger-item {
    opacity: 0;
}

.stagger-item:nth-child(1) { animation: fadeIn 0.5s ease forwards 0.1s; }
.stagger-item:nth-child(2) { animation: fadeIn 0.5s ease forwards 0.2s; }
.stagger-item:nth-child(3) { animation: fadeIn 0.5s ease forwards 0.3s; }
.stagger-item:nth-child(4) { animation: fadeIn 0.5s ease forwards 0.4s; }
.stagger-item:nth-child(5) { animation: fadeIn 0.5s ease forwards 0.5s; }
.stagger-item:nth-child(6) { animation: fadeIn 0.5s ease forwards 0.6s; }
