/* Text Animation Styles */

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide In From Left */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide In From Right */
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Enhanced Slide In From Right for Logo */
.col-lg-6.text-center .slide-in-right {
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 1s ease, transform 1s ease;
    max-height: 300px;
    width: auto;
}

.col-lg-6.text-center .slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale In Animation */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Typing Animation */
.typing-animation {
    overflow: hidden;
    border-right: 2px solid var(--primary-color, #198754);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    display: inline-block;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color, #198754) }
}

/* Highlight Text Animation */
.highlight-text {
    position: relative;
    display: inline-block;
}

.highlight-text::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(var(--primary-color-rgb, 25, 135, 84), 0.3);
    z-index: -1;
    transition: width 1s ease;
}

.highlight-text.visible::after {
    width: 100%;
}

/* Staggered Animation Delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }
.delay-800 { transition-delay: 0.8s; }

/* Bounce Animation */
.bounce-in {
    opacity: 0;
    animation-duration: 1s;
    animation-fill-mode: both;
}

.bounce-in.visible {
    animation-name: bounceIn;
    opacity: 1;
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% {
        transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(.9, .9, .9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(.97, .97, .97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* Product Card Hover Effects */
.product-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.product-card .product-img {
    transition: all 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-card .btn {
    transition: all 0.3s ease;
}

.product-card:hover .btn-outline-primary {
    background-color: var(--primary-color, #198754);
    color: white;
    border-color: var(--primary-color, #198754);
}

/* Car Brand Card Hover Effects */
.hover-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.125);
    overflow: hidden;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--primary-color, #198754);
}

.hover-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(var(--primary-color-rgb, 25, 135, 84), 0.05);
    transition: height 0.3s ease;
    z-index: 0;
}

.hover-card:hover::before {
    height: 100%;
}

.hover-card .card-title {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.hover-card:hover .card-title {
    color: var(--primary-color, #198754) !important;
}

/* Mobile Responsiveness Fixes */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Logo container styles */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Scroll to top button animations */
.scroll-top-btn {
    transform: scale(0);
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
}

.scroll-top-btn.visible {
    transform: scale(1);
}

.scroll-top-btn:hover {
    transform: scale(1.1);
}

.scroll-top-btn.clicked {
    animation: pulse 0.7s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Adjust animations for mobile to prevent horizontal scroll */
@media (max-width: 767px) {
    .slide-in-left, .slide-in-right {
        transform: translateX(0);
        opacity: 0;
    }
    
    .slide-in-left.visible, .slide-in-right.visible {
        opacity: 1;
    }
    
    /* Disable parallax effect on mobile */
    .slide-in-left, .slide-in-right {
        transform: none !important;
    }
    
    /* Reduce animation distances on mobile */
    .fade-in {
        transform: translateY(10px);
    }
    
    /* Ensure all content stays within viewport */
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Adjust card hover effects for mobile */
    .product-card:hover, .hover-card:hover {
        transform: translateY(-5px);
    }
    
    /* Keep logo animation on mobile */
    .col-lg-6.text-center .slide-in-right {
        transform: translateX(30px) !important;
        max-width: 70% !important;
        max-height: 180px !important;
        margin: 0 auto;
    }
    
    .col-lg-6.text-center .slide-in-right.visible {
        transform: translateX(0) !important;
    }
    
    /* Adjust hero section spacing on mobile */
    #hero .col-lg-6.text-center {
        margin-top: 20px;
    }
    
    /* Mobile-specific logo container styles */
    .logo-container {
        padding: 10px;
        max-width: 80%;
        margin: 0 auto;
    }
    
    .logo-container img {
        max-width: 100% !important;
        max-height: 160px !important;
    }
} 