@tailwind base;
@tailwind components;
@tailwind utilities;

/* Reset default styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

nav ul {
  transition: all 0.5s ease;
  height: 60px;
}

nav ul li {
  position: relative;
  transition: color 0.5s ease;
}

nav ul li:hover {
  color: #4568dc;
}

/* The pseudo-element for the animated border */
nav ul li::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  border-radius: 2px;
  height: 4px;
  background-color: #4568dc;
  transition: width 0.3s ease-in-out;
}

/* Expand the border on hover */
nav ul li:hover::after {
  width: 100%;
}

/* Remove underline animation */
#buyBtn::after {
  display: none;
}

#videoDialog {
  opacity: 0; /* Initially hidden */
  transform: scale(0.9); /* Slightly scaled down */
  transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth transitions */
}

/* When dialog is visible */
#videoDialog[open] {
  opacity: 1;
  transform: scale(1); /* Scale to normal size */
}

#working-with div i {
  font-size: 1.5rem;
}
#working-with div span {
  display: flex;
  align-items: center;
}

.active {
  display: flex;
}

/* Smooth rotation for icon */
.rotate-icon {
  transform: rotate(90deg); /* Rotate smoothly */
  transition: transform 0.5s ease; /* Smooth animation for rotation */
}

#about-img-placeholder {
  width: 80vw;
  height: 80vh;
  max-width: 540px;
  max-height: 540px;
  background-image: url("../assets/images/online-investigations.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 25px;
  margin-inline: 1rem;
}

#about {
  background-image: url("../assets/images/about-gradient.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Accordion */
.accordion-item {
  max-height: 4.5rem;
  overflow: hidden;
  transition: all 0.3s ease !important;
}

.accordion-heading i {
  cursor: pointer;
  transition: transform 0.5s ease; /* Smooth rotation transition */
}

.accordion-heading i.rotate {
  transform: rotate(360deg);
}

.expanded {
  max-height: 300px;
}

/* Animations */
@keyframes marquee {
  0% {
    transform: translateX(100%); /* Start off-screen to the right */
  }
  100% {
    transform: translateX(-100%); /* End off-screen to the left */
  }
}

/* Wrapper for the video */
.responsive-video-container {
  position: relative;
  width: 90%;
  padding-top: 56.25%; /* 16:9 aspect ratio (height / width * 100) */
  overflow: hidden;
  border-radius: 8px;
}

/* Make the iframe fill the container */
.responsive-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Utility classes */
.tag {
  @apply bg-babyblue px-3 rounded-full text-blue-700 text-center;
}

.heading {
  @apply my-4 mb-0 font-semibold text-2xl sm:text-3xl md:text-4xl md:leading-10;
}

.card {
  position: relative;
  background-image: url("../assets/images/card-element.png"); /* Core */
  background-position: top;
  background-size: contain;
  background-repeat: no-repeat;
}

.pro-card {
  background-image: url("../assets/images/dark-card-element.png"); /* Pro */
}

p {
  opacity: 80;
}

h1:not(:first-of-type) {
  opacity: 0.8 !important;
}

.testimonial-bg {
  background-image: url("../assets/images/testimonial-graident.png");
  background-size: cover;
}

#slider div p {
  font-family: "Times New Roman", Times, serif !important;
  font-size: 24px !important;
}

/***MEDIA QUERIES***/
/* Tablet Mode 1024px */
@media only screen and (max-width: 1024px) {
  .marquee {
    overflow: hidden;
    white-space: nowrap; /* Prevent wrapping of text */
    position: relative;
    box-sizing: border-box;
    width: 100%; /* Ensure it doesn't exceed the screen width */
  }

  .marquee-content {
    animation: marquee 10s linear infinite; /* Continuous scrolling effect */
  }

  #about-img-placeholder {
    width: 100%;
    max-width: 95vw;
    max-height: 50vh;
  }

  #menu {
    position: absolute;
    top: 1.75rem;
    right: 1rem;
    z-index: 999;
  }

  #logo {
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    z-index: 999;
  }

  nav {
    min-height: 80px;
  }

  nav ul {
    transition: all 0.5s ease;
    background-color: white;
    width: 100vw;
    height: 100vh;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: left;
    gap: 2rem;
  }
}

/* Phone Mode 760px */
@media only screen and (max-width: 768px) {
  #about-img-placeholder {
    max-width: 90vw;
  }

  #slider div p {
    font-size: 22px !important;
    line-height: 24px;
  }
}

/* Phone Mode 460px */
@media only screen and (max-width: 460px) {
  #slider div p {
    font-size: 18px !important;
    line-height: 24px;
  }
}

/* Enable 3D Perspective */
.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  transition: transform 0.6s ease-in-out; /* Smooth flipping animation */
  transform-style: preserve-3d; /* Ensures 3D rendering */
  width: 100%;
  height: 100%;
  position: relative;
}

/* Front and Back Faces */
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* Hide the opposite side when flipped */
  border-radius: 1.5rem; /* Ensures rounded edges match */
}

/* Rotate Back Face */
.flip-card-back {
  transform: rotateY(180deg); /* Back face starts flipped */
}

/* Flip the Entire Card */

.flip-card-inner.flipped {
  transform: rotateY(180deg);
}

#working-with::before {
  position: absolute;
  top: -2.5rem;
  content: "Working With";
  display: block;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1rem;
  color: rgba(0, 0, 0, 0.7);
}

#partner-logos::before {
  content: "Trusted By";
  padding-top: 1rem;
  opacity: 0.7;
  margin-bottom: -1rem;
}

/* Trial Page */
.congrats-img {
  max-width: 340px;
  margin-bottom: -2rem;
}

/* Togglers */

.active-btn {
  background-color: "white";
}

.demos {
  background-image: url("../assets/images/about-gradient.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-blend-mode: soft-light;
}
