/* Interactive Underline for Desktop Menu */
nav .md:flex a {
  position: relative;
  padding-bottom: 0.25rem;
  margin: 0 0.5rem;
  /* Added spacing between items */
}

nav .md:flex a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #d4a017, #ffd700);
  transition: width 0.3s ease;
}

nav .md:flex a:hover::after {
  width: 100%;
}

@font-face {
  font-family: "Harlekin";
  src: url("./trinity/Fonts/Satisfy-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary-color: #90ee90;
  --secondary-color: #98fb98;
  --red-color: #ff4040;
  --light-color: #f3f4f6;
  --white-color: #ffffff;
  --font-garamond: "Cormorant Garamond", serif;
  --font-poppins: "Poppins", sans-serif;
}

body {
  font-family: var(--font-poppins);
  color: var(--primary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-garamond);
  font-weight: 800;
  color: var(--primary-color);
  font-size: large;
}

#carousel {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s ease-in-out;
}

.card-carousel {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--white-color);
  font-size: 1.5rem;
  font-weight: bold;
  padding: 30px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  animation: kenburns 20s ease-in-out infinite;
}

.custom-stroke {
  -webkit-text-stroke: 2px #0c0a09;
  paint-order: stroke fill;
}

#card1 {
  transform: rotateY(0deg) translateZ(1000px);
}

#card2 {
  transform: rotateY(120deg) translateZ(1000px);
}

#card3 {
  transform: rotateY(240deg) translateZ(1000px);
}

@media (max-width: 768px) {
  .card-carousel {
    font-size: 1.25rem;
    padding: 20px;
  }
}

@keyframes kenburns {
  0% {
    transform: scale(1) translate(0, 0);
  }

  50% {
    transform: scale(1.1) translate(10px, -10px);
  }

  100% {
    transform: scale(1) translate(0, 0);
  }
}

/* Custom Animations */
@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounce-slow {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.properties-margin {
  margin-left: 2rem;
  margin-right: 2rem;
}

.past-projects-margin {
  margin-left: 2rem;
  margin-right: 2rem;
}

.custom-margin {
  margin-left: 2rem !important;
  margin-right: 2rem !important;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.font-harlekin {
  font-family: "Harlekin", sans-serif;
}

.font-poppins {
  font-family: "Poppins", sans-serif;
}

.animate-fade-in-down {
  animation: fade-in-down 1s ease forwards;
}

.animate-scale-in {
  animation: scale-in 1s ease forwards;
}

.animate-bounce-slow {
  animation: bounce-slow 3s infinite;
}

/* Loader Styles */
#loader {
  display: flex;
  transition: opacity 0.5s ease;
  background: linear-gradient(to bottom, #052e16, #1b3c34);
}

#loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #d4a017;
  border-top: 6px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#loader::after {
  content: "Loading...";
  font-family: var(--font-garamond);
  color: #d4a017;
  font-size: 1.5rem;
  position: absolute;
  bottom: 20%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
  }

  #loader::after {
    font-size: 1.2rem;
  }
}

/* -----------------------------------------
             Navbar Styles 
------------------------------------------*/
.nav-link {
  position: relative;
  color: white;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  padding-bottom: 4px; /* Space for underline */
}

/* Hover and active underline effect */
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: #98fb98; /* Accent color */
  transition: width 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover {
  color: #98fb98;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Active link */
.nav-link.active {
  color: #98fb98;
}

/* Ensure smooth transitions for mobile menu */
#nav-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

#nav-menu:not(.hidden) {
  max-height: 500px; /* Adjust based on menu height */
}

/* Responsive adjustments */
@media (min-width: 1024px) {
  #nav-menu {
    max-height: none;
    overflow: visible;
  }
}
