.grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 450px;
}
.grid-item img,
.grid-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.6s ease;
}
.grid-item video {
  opacity: 0;
  pointer-events: none;
}

/* SVG Focus Effect */
.w__cardProjectFocus {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.grid-item:hover .w__cardProjectFocus {
  opacity: 1;
}
.cardProjectFocusSvg {
  position: absolute;
  width: 2rem;
  height: 2rem;
}
.svg_tr {
  top: 0;
  left: -0.65rem;
}
.svg_tl {
  top: 0;
  right: -0.65rem;
}
.svg_br {
  bottom: -0.65rem;
  left: 0;
  transform: rotate(180deg);
}
.svg_bl {
  bottom: -0.65rem;
  right: 0;
  transform: rotate(180deg);
}

/* SVG Path Styles */
.svg-path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.6s ease-out;
}

/* Hover animations */
.grid-item:hover img {
  opacity: 0;
}
.grid-item:hover video {
  opacity: 1;
}
.grid-item:hover .svg-path {
  stroke-dashoffset: 0;
}

/* Staggered SVG animations */
.grid-item:hover .svg_tl .svg-path {
  transition-delay: 0s;
}
.grid-item:hover .svg_tr .svg-path {
  transition-delay: 0.1s;
}
.grid-item:hover .svg_bl .svg-path {
  transition-delay: 0.2s;
}
.grid-item:hover .svg_br .svg-path {
  transition-delay: 0.3s;
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}

.grid-item {
  opacity: 0;
  transform: translateY(50px);
  filter: blur(2px);
  transition: all 0.6s ease;
}

.grid-item.animate-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

/* Icon pop-up hover effect */
.icon-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  opacity: 0;
  z-index: 5;
  transform: translate(-50%, -50%) scale(0.5);
  transition:
    transform 0.5s cubic-bezier(0.4, 1, 0.4, 1),
    opacity 0.4s cubic-bezier(0.4, 1, 0.4, 1);
  pointer-events: none;
}
.grid-item:hover .icon-pop {
  opacity: 1;
  transform: scale(1);
}
.icon-top {
  transition-delay: 0.05s;
}
.icon-right {
  transition-delay: 0.15s;
}
.icon-bottom {
  transition-delay: 0.25s;
}
.icon-left {
  transition-delay: 0.35s;
}
.grid-item:hover .icon-top {
  transform: translate(-50%, -120%) scale(1.1);
}
.grid-item:hover .icon-right {
  transform: translate(80%, -50%) scale(1.1);
}
.grid-item:hover .icon-bottom {
  transform: translate(-50%, 80%) scale(1.1);
}
.grid-item:hover .icon-left {
  transform: translate(-120%, -50%) scale(1.1);
}

.draw-line {
  width: 0%;
  transition: width 0.3s ease-out;
}

.hand-move {
  right: 100%;
  transition: right 0.3s ease-out;
}

:root {
  --duration: 280s;
  --gap: 0.5rem;
}

@keyframes marquee-horizontal {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes marquee-vertical {
  from {
    transform: translateY(0%);
  }
  to {
    transform: translateY(-100%);
  }
}

.animate-marquee {
  animation: marquee-horizontal var(--duration) linear infinite;
}

.animate-marquee-vertical {
  animation: marquee-vertical var(--duration) linear infinite;
}

.group:hover .group-hover-pause {
  animation-play-state: paused;
}

.reverse {
  animation-direction: reverse;
}

/* Demo image placeholder styles */
.demo-img {
  width: 200px;
  height: 150px;
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  text-align: center;
  margin: 0 8px;
}

.testimonials-container {
  background-color: #191919;
  padding: 80px 16px;
}

@media (min-width: 1024px) {
  .testimonials-container {
    padding: 80px 48px;
  }
}

.testimonials-grid {
  max-width: 500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 120px;
}

@media (min-width: 768px) {
  .testimonials-container {
    padding: 80px 32px;
  }
  .testimonials-grid {
    max-width: 1000px;
  }
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.images-section {
  position: relative;
}

.images-container {
  position: relative;
  height: 320px;
  width: 100%;
}

.testimonial-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
  transform: scale(0.95) rotateY(5deg);
  transform-origin: bottom;
  transition: all 0.4s ease-in-out;
  z-index: 1;
}

.testimonial-image.active {
  opacity: 1;
  transform: scale(1) rotateY(0deg);
  z-index: 40;
  animation: bounce 0.4s ease-in-out;
}

.testimonial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 0 !important;
}

@keyframes bounce {
  0%,
  100% {
    transform: scale(1) translateY(0) rotateY(0deg);
  }
  50% {
    transform: scale(1) translateY(-20px) rotateY(0deg);
  }
}

.content-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 0;
}

.testimonial-content {
  flex: 1;
}

.testimonial-name {
  font-size: 32px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 8px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.testimonial-designation {
  font-size: 14px;
  color: #fff;
  margin-bottom: 32px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.testimonial-quote {
  font-size: 18px;
  color: #fff;
  line-height: 1.6;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.testimonial-quote .word {
  display: inline-block;
  transition: all 0.3s ease-in-out;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wordReveal {
  to {
    filter: blur(0px);
    opacity: 1;
    transform: translateY(0);
  }
}

.navigation-buttons {
  display: flex;
  gap: 16px;
  padding-top: 48px;
}

@media (min-width: 768px) {
  .navigation-buttons {
    padding-top: 0;
  }
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 0;
  background-color: #f3f4f6;
  border: 1px solid #f3f4f6;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-button:hover {
  background-color: #e5e7eb;
  border-color:  white;
}

.nav-button svg {
  color: #000000;
  transition: transform 0.3s ease;
}

.prev-button:hover svg {
  transform: rotate(12deg);
}

.next-button:hover svg {
  transform: rotate(-12deg);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #000000;
    color: #ffffff;
  }

  .testimonial-name {
    color: #ffffff;
  }

  .testimonial-designation {
    color: #fff;
  }

  .testimonial-quote {
    color: #fff;
  }

  .nav-button {
    background-color: #262626;
    border: 1px solid #262626;
  }

  .nav-button:hover {
    background-color: #404040;
  }

  .nav-button svg {
    color: #a3a3a3;
  }
}

/* Stacking effect for images */
.testimonial-image:nth-child(1) {
  z-index: 5;
}
.testimonial-image:nth-child(2) {
  z-index: 4;
}
.testimonial-image:nth-child(3) {
  z-index: 3;
}
.testimonial-image:nth-child(4) {
  z-index: 2;
}
.testimonial-image:nth-child(5) {
  z-index: 1;
}

.testimonial-image:not(.active) {
  transform: scale(0.95) rotateY(var(--random-rotate, 5deg));
}
