:root {
  --primary: #00B87B;
  --secondary: #314355;
  --light: #F2F2F2;
  --dark: #2C3E50;
}

#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity .5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

@media (max-width: 991.98px) {
  .sticky-lg-top.vh-100 {
    height: 100% !important;
  }
}

.fw-semi-bold {
  font-weight: 600;
}

.fw-medium {
  font-weight: 500;
}

.btn-square {
  width: 40px;
  height: 40px;
}

.btn-sm-square {
  width: 30px;
  height: 30px;
}

.btn-lg-square {
  width: 50px;
  height: 50px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn.btn-primary {
  color: #FFFFFF;
}

.typed-cursor {
  font-size: 25px;
  color: var(--light);
}

.back-to-top {
  position: fixed;
  display: none;
  width: 30px;
  height: 30px;
  text-align: center;
  line-height: 1;
  font-size: 30px;
  right: 30px;
  bottom: 30px;
  transition: background 0.5s;
  z-index: 11;
}

.back-to-top i {
  color: var(--primary);
}

.back-to-top i:hover {
  color: var(--dark);
}

.back-to-top {
  -webkit-animation: action 1s infinite alternate;
  animation: action 1s infinite alternate;
}

@-webkit-keyframes action {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-15px);
  }
}

@keyframes action {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-15px);
  }
}

.title {
  position: relative;
}

.title::before {
  position: absolute;
  content: "";
  width: 10px;
  height: 10px;
  bottom: -4px;
  left: 0;
  border: 2px solid var(--light);
  border-radius: 10px;
}

.title::after {
  position: absolute;
  content: "";
  width: 50px;
  height: 2px;
  bottom: 0;
  left: 15px;
  border-radius: 2px;
  background: var(--light);
}

.progress {
  height: 5px;
}

.progress .progress-bar {
  width: 0px;
  transition: 2s;
}

.service-item {
  padding: 30px;
  text-align: center;
  background: var(--secondary);
}

.service-item i {
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  color: var(--primary);
  transition: .5s;
}

.service-item:hover i {
  background: var(--primary);
  color: var(--light);
}



.testimonial-carousel .owl-dots {
  margin-top: 25px;
  text-align: center;
}

.testimonial-carousel .owl-dot {
  display: inline-block;
  margin: 0 5px;
  width: 15px;
  height: 15px;
  background: var(--light);
}

.testimonial-carousel .owl-dot.active {
  background: var(--primary);
}



/*PortFolio Card Css */

/* Portfolio Card Container */
.card-container {
  perspective: 1000px;
  height: 400px;
  width: 180px; /* Adjust as needed */
  border-radius: 15px; /* Ensuring rounded corners */
  aspect-ratio: 9 / 16;
  overflow: visible; /* Prevents overflow issues */
}

/* Card Structure */
.card {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s ease-in-out;
  transform-style: preserve-3d;
  cursor: pointer;
  border-radius: 15px; /* Matches container */
}

/* Card Front & Back */
.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px; /* Rounded corners */
  backface-visibility: hidden; /* Ensures smooth flipping */
}

/* Front Side */
.card-front {
  background: var(--secondary);
  border: 3px solid white; /* White border */
  border-radius: 15px;
  overflow: hidden; /* Ensures video doesn’t overflow */
  position: relative;
  z-index: 2; /* Ensures it stays on top when not flipped */
}

/* Logo Overlay (Now Same Size as Video) */
.card-front .video-logo {
  position: absolute;
  width: 100%;  /* Same width as video */
  height: 100%; /* Same height as video */
  object-fit: cover; /* Ensures proper scaling */
  z-index: 2;
  transition: opacity 0.3s ease-in-out;
}

/* Video (Initially Hidden) */
.card-front .portfolio-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Video Hover Effect */
.card-front:hover .video-logo {
  opacity: 0; /* Hide logo */
}

.card-front:hover .portfolio-video {
  opacity: 1; /* Show video */
}

/* Back Side */
.card-back {
  background: var(--secondary);
  transform: rotateY(180deg);
  border: 3px solid white; /* White border */
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Initially behind the front */
  pointer-events: auto; /* Ensure clicks register */
}

/* Hide any accidental video on the back */
.card-back .portfolio-video {
  display: none;
}

/* Flip Animation */
.card.flip {
  transform: rotateY(180deg);
  z-index: 3; /* Bring to the front when flipped */
}

/* Prevent Front Side from Blocking Clicks when Flipped */
.card.flip .card-front {
  pointer-events: none;
}

/* Button Styling */
.back-content .btn, .portfolio-btn-icons .btn {
  font-size: 18px;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 4; /* Ensures buttons are clickable */
  pointer-events: auto;
  position: relative;
}
