.outer {
  width: calc(100% - 4rem);
  max-width: 1400px;
  height: 270px;
  border-radius: 10px;
  padding: 1px;
  position: relative;
}

@media (max-width: 768px) {
  .outer {
    width: 325px;
    height: 320px;
  }
  .services-section {
    padding: 1rem 2rem !important;
  }
}

.dot {
  width: 8px;
  aspect-ratio: 1;
  position: absolute;
  background-color: #fff;
  box-shadow: 0 0 15px #ffffff;
  border-radius: 100px;
  z-index: 2;
  animation: moveDot 12s linear infinite;
}

@keyframes moveDot {
  0% {
    top: 10%;
    left: 10%;
  }

  40% {
    top: 10%;
    left: calc(90% - 8px);
  }

  50% {
    top: calc(90% - 8px);
    left: calc(90% - 8px);
  }

  90% {
    top: calc(90% - 8px);
    left: 10%;
  }

  100% {
    top: 10%;
    left: 10%;
  }
}

.card {
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  border: solid 1px #202222;
  background-size: 20px 20px;
  background: radial-gradient(circle 800px at 0% 0%, #444444, #0c0d0d);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-direction: column;
  color: #fff;
}

.ray {
  width: 365px;
  height: 100px;
  border-radius: 100px;
  position: absolute;
  background-color: #c7c7c7;
  opacity: 0.4;
  box-shadow: 0 0 50px #fff;
  filter: blur(50px);
  transform-origin: 10%;
  top: 0%;
  left: 0;
  transform: rotate(40deg);
}

.card .text {
  font-weight: bolder;
  font-size: 4rem;
  background: linear-gradient(45deg, #000000 4%, #fff, #000);
  background-clip: text;
  color: transparent;
}

.line {
  width: 100%;
  height: 1px;
  position: absolute;
  background-color: #2c2c2c;
}

.topl {
  top: 10%;
  background: linear-gradient(90deg, #888888 30%, #1d1f1f 70%);
}

.bottoml {
  bottom: 10%;
}

.leftl {
  left: 10%;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, #747474 30%, #222424 70%);
}

.rightl {
  right: 10%;
  width: 1px;
  height: 100%;
}

/* Flip Card Styles */
.section {
  margin-top: 120px;
}
.para {
  max-width: 55%;
}

.para p {
  font-size: 1.4rem !important;
  font-weight: 500;
  margin-top: 0.8rem;
  line-height: 1.3;
  color: #f4883d;
  font-family: 'Manrope', sans-serif;
  text-align: center;
}

.services-section {
  max-width: 1400px;
  margin: 0 auto;
  background: transparent;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-card {
  position: relative;
  height: 400px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  display: block;
}

.service-card:nth-child(1) {
  background: transparent;
}

.service-card:nth-child(2) {
  background: transparent;
}

.service-card:nth-child(3) {
  background: transparent;
}

.service-card:nth-child(4) {
  background: transparent;
}

.service-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.service-card:hover .service-background {
  transform: scale(1.1);
}

.service-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 25px;
  z-index: 3;
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.85);
  /* black with opacity for readability */

}

.service-title {
  color: white;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
  font-family: 'Manrope', sans-serif;
}

.service-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  font-family: 'Manrope', sans-serif;
}

.service-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
  max-height: 0;
  overflow: hidden;
  font-family: 'Manrope', sans-serif;
}

.service-card:hover .service-description {
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
}


.service-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  background: rgba(59, 130, 246, 1);
  box-shadow: 0 0 16px 2px #000000aa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  cursor: pointer;
  animation: arrow-bounce 2.2s infinite cubic-bezier(.4, 2, .6, 1);
  transition: background 0.4s, box-shadow 0.4s, transform 0.4s;
}

.service-arrow svg {
  width: 28px;
  height: 28px;
  color: #fff;
  filter: drop-shadow(0 0 8px #3b82f6cc);
  transition: transform 0.5s cubic-bezier(.4, 2, .6, 1), color 0.4s;
}

.service-card:hover .service-arrow {
  background: #3b82f6;
  box-shadow: 0 0 32px 6px #3b82f6cc, 0 0 8px 2px #fff2e0;
  transform: scale(1.15) rotate(18deg);
}

.service-card:hover .service-arrow svg {
  color: #f4883d;
  transform: rotate(-45deg) scale(1.18);
}

@keyframes arrow-bounce {

  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 16px 2px #000000aa;
  }

  20% {
    transform: translateY(-8px) scale(1.08);
    box-shadow: 0 0 24px 4px #000000cc;
  }

  40% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 16px 2px #000000aa;
  }

  60% {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 0 20px 3px #000000bb;
  }

  80% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 16px 2px #000000aa;
  }
}

@media (max-width: 968px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .para {
    max-width: 75%;
  }
  .service-card {
    height: 350px;
  }
}

@media (max-width: 640px) {
  .service-card {
    height: 300px;
  }

  .service-title {
    font-size: 22px;
  }

  .service-content {
    padding: 30px;
  }

  .service-arrow {
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
  }
}