/* ============================================
   TECHMYCAR ANIMATIONS
   ============================================ */

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

/* Fade Up Animation */
.animate-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Scale Up Animation */
.animate-scale-up {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Slide Up Animation */
.animate-slide-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade In Animation */
.animate-fade-in {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in.visible {
  opacity: 1;
}

/* ============================================
   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;
}

/* ============================================
   HOVER ANIMATIONS
   ============================================ */

/* Button Hover Effects */
.btn-primary,
.btn-secondary,
.btn-dark,
.btn-white,
.btn-outline {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(1, 91, 248, 0.4);
}

.btn-secondary:hover,
.btn-dark:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-outline:hover {
  background: var(--text-primary);
  color: var(--text-white);
  transform: translateY(-3px);
}

/* Card Hover Effects */
.design-card,
.testimonial-large,
.appointment-card,
.guide-small {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.design-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.testimonial-large:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.guide-small:hover {
  transform: scale(1.03);
}

/* Image Hover Effects */
.card-image img,
.guide-large img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.appointment-card:hover .card-image img,
.guide-large:hover img {
  transform: scale(1.05);
}

/* Play Button Hover */
.play-btn,
.guide-play {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.play-btn:hover,
.guide-play:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Link Hover Effects */
.nav-link,
.footer-col a,
.footer-legal a {
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::before {
  width: 100%;
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #01d0fc 0%, #015bf8 100%);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(1, 91, 248, 0.5);
}

/* ============================================
   NAVBAR SCROLL ANIMATIONS
   ============================================ */

.navbar {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar.hide {
  transform: translateY(-100%);
}

.navbar.show {
  transform: translateY(0);
}

/* ============================================
   PARALLAX EFFECTS
   ============================================ */

.parallax-slow {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax-medium {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax-fast {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   STAGGER ANIMATIONS
   ============================================ */

.feature-item:nth-child(1) {
  transition-delay: 0.1s;
}

.feature-item:nth-child(2) {
  transition-delay: 0.2s;
}

.feature-item:nth-child(3) {
  transition-delay: 0.3s;
}

.design-card:nth-child(1) {
  transition-delay: 0.1s;
}

.design-card:nth-child(2) {
  transition-delay: 0.2s;
}

.design-card:nth-child(3) {
  transition-delay: 0.3s;
}

.faq-item:nth-child(1) {
  transition-delay: 0.1s;
}

.faq-item:nth-child(2) {
  transition-delay: 0.2s;
}

.faq-item:nth-child(3) {
  transition-delay: 0.3s;
}

/* ============================================
   VIDEO & IMAGE OVERLAYS
   ============================================ */

.video-overlay,
.guide-overlay {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-card:hover .video-overlay,
.guide-small:hover .guide-overlay {
  transform: translateY(-5px);
}

/* ============================================
   STATS COUNTER ANIMATION
   ============================================ */

.stat-number {
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-box:hover .stat-number {
  transform: scale(1.1);
  color: var(--primary-blue);
}

/* ============================================
   FAQ ACCORDION ANIMATION
   ============================================ */

.faq-item {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 15px;
}

.faq-item[open] {
  background: rgb(241, 241, 242);
  border-radius: 15px;
  -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  -ms-border-radius: 15px;
  -o-border-radius: 15px;
  margin-bottom: 10px;
}

.faq-item:hover {
  background: rgb(241, 241, 242);
  border-radius: 15px;
  margin-bottom: 10px;

}

.faq-icon {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  color: #000000;
}

.faq-item summary:hover .faq-icon {
  transform: scale(1.2);
}

/* ============================================
   CAROUSEL ANIMATIONS
   ============================================ */

.carousel-track {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-dots .dot {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-dots .dot:hover {
  transform: scale(1.3);
  background: #999;
}

.carousel-dots .dot.active {
  animation: dotPulse 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dotPulse {
  0% {
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */

.gradient-animate {
  background: linear-gradient(
    -45deg,
    #01d0fc,
    #015bf8,
    #01d0fc,
    #015bf8
  );
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ============================================
   PULSE ANIMATIONS
   ============================================ */

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   FLOATING ANIMATIONS
   ============================================ */

.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float-delayed {
  animation: float 6s ease-in-out 3s infinite;
}

/* ============================================
   BOUNCE ANIMATIONS
   ============================================ */

.bounce {
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-15px);
  }
  60% {
    transform: translateY(-7px);
  }
}

/* ============================================
   TEXT REVEAL ANIMATIONS
   ============================================ */

.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  animation: textSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes textSlideUp {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================
   ROTATE ANIMATIONS
   ============================================ */

.rotate-on-hover {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rotate-on-hover:hover {
  transform: rotate(5deg) scale(1.05);
}

/* ============================================
   SLIDE IN ANIMATIONS
   ============================================ */

.slide-in-left {
  opacity: 0;
  transform: translateX(-100px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.slide-in-right {
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================
   RIPPLE EFFECT
   ============================================ */

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

* {
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   PAGE LOAD ANIMATIONS
   ============================================ */

.page-load {
  animation: pageLoad 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageLoad {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   MOBILE MENU ANIMATIONS
   ============================================ */

.mobile-menu {
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-fade-up,
  .animate-scale-up,
  .animate-slide-up,
  .slide-in-left,
  .slide-in-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================
   PERFORMANCE OPTIMIZATION
   ============================================ */

.animate-fade-up,
.animate-scale-up,
.animate-slide-up,
.slide-in-left,
.slide-in-right,
.parallax-slow,
.parallax-medium,
.parallax-fast {
  will-change: transform, opacity;
}

.btn-primary,
.btn-secondary,
.design-card,
.testimonial-large {
  will-change: transform;
}

/* Remove will-change after animation completes */
.visible {
  will-change: auto;
}



/* GRID */
.ratings-app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ratings-card-left {
    position: relative;
    background: #ffffff;
    border-radius: 32px;
    padding: 40px;
    overflow: visible !important;
    min-height: 650px;
}

.rating-float {
    position: absolute;
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    row-gap: 6px;
    background: #F1F1F3;
    padding: 18px 20px;
    border-radius: 12px;
    width: 285px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 1; /* Changed from 10 to 1 - behind right card */

    /* Default hidden state */
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rating-float img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    grid-column: 1;
    grid-row: 1 / 3;
    object-fit: cover;
}

.rating-float strong {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mt-50 {
    margin-top: 50px;
}

.rating-float p {
    grid-column: 1 / -1;
    font-size: 13px;
    line-height: 1.35;
    color: #5f6368;
    margin: 6px 0 0;
}

.rating-float span {
    font-size: 13px;
    font-weight: 600;
}

/* NAME + STARS */
.rating-content {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars {
    color: #000;
    font-size: 12px;
}

.rating-number {
    color: #333;
    font-weight: 700;
}

/* CARD POSITIONS */
.rating-one {
    top: 230px;
    left: 315px;
}

.rating-two {
    top: 328px;
    left: 20px;
}

.rating-three {
    top: 425px;
    left: 315px;
}

/* HIDDEN STATE - Before Animation */
.rating-one:not(.animate) {
    transform: translateX(150px);
    opacity: 0;
}

.rating-two:not(.animate) {
    transform: translateX(-150px);
    opacity: 0;
}

.rating-three:not(.animate) {
    transform: translateX(150px);
    opacity: 0;
}

/* ANIMATED STATE - With Delays */
.rating-one.animate {
    transform: translateX(0) !important;
    opacity: 1 !important;
    transition-delay: 0.2s;
}

.rating-two.animate {
    transform: translateX(0) !important;
    opacity: 1 !important;
    transition-delay: 0.4s;
}

.rating-three.animate {
    transform: translateX(0) !important;
    opacity: 1 !important;
    transition-delay: 0.6s;
}

/* RIGHT CARD */
.ratings-card-right {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    min-height: 650px;
    z-index: 5; /* Higher z-index so cards slide behind it */
}

.ratings-card-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* TEXT OVER IMAGE */
.app-text {
    position: absolute;
    top: 32px;
    left: 32px;
    z-index: 2;
    color: #fff;
    max-width: 70%;
}

.app-text span {
    font-size: 13px;
    opacity: 0.85;
}

.app-text h4 {
    font-size: 22px;
    margin-top: 6px;
    line-height: 1.3;
}

.ratings-badge {
    font-size: 13px;
    color: #7b7f85;
}

.ratings-title {
    font-size: 30px;
    font-weight: 700;
    margin: 16px 0 32px;
    line-height: 1.25;
    color: #121212;
}

/* MOBILE */
@media (max-width: 991px) {
    .ratings-app-grid {
        grid-template-columns: 1fr;
    }

    .rating-float {
        position: static;
        width: 100%;
        margin-top: 16px;
        opacity: 1 !important;
        transform: none !important;
    }

    .ratings-card-left {
        padding: 30px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .ratings-title {
        font-size: 24px;
    }

    .app-text h4 {
        font-size: 18px;
    }

    .ratings-card-left {
        min-height: auto;
    }

    .ratings-card-right {
        min-height: 500px;
    }
}
