/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  color: #fff;
  background-color: #040104 !important; /* Fallback color */
}


/* Preloader Styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #040104; /* Background matching site theme */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.8s ease; /* Smooth fade effect */

}

.preloader-content {
  text-align: center;
}

.preloader-logo img {
  width: 100px;
  margin-bottom: 20px;
  animation: fadeIn 1.5s ease-in-out infinite;
}

.preloader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #7c52f9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}


/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Spline Background */
.spline-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Behind all content */
}

.spline-background spline-viewer {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none; /* Ensure spline viewer doesn't block interactions */
}

.spline-background .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Slightly dark overlay */
  z-index: 1; /* Sits above the Spline viewer */
}

/* Hero Content */
.hero-content {
  position: relative;
  text-align: center;
  z-index: 2; /* Above the overlay */
  pointer-events: auto; /* Ensure text remains interactive */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px; /* Add consistent spacing between elements */
}

.hero-content h1 {
  font-size: 4rem;
  margin: 0; /* Remove default margin to rely on flex spacing */
  color: white;
  background: linear-gradient(90deg, #ffffff, #7c52f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s infinite;
}

.hero-content p {
  font-size: 1.5rem;
  margin: 0; /* Remove default margin to rely on flex spacing */
  color: white;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7); /* Adds readability */
}

/* Scroll to Explore */
.scroll-down {
  position: fixed; /* Stays fixed at the bottom of the screen */
  bottom: 30px; /* 30px above the bottom */
  left: 50%; /* Center horizontally */
  transform: translateX(-50%); /* Correct centering */
  text-align: center;
  z-index: 2; /* Ensure it's above the Spline viewer */
  opacity: 1; /* Fully visible by default */
  transition: opacity 0.5s ease; /* Smooth fade effect */
}


.scroll-down span {
  display: block;
  font-size: 1rem;
  margin-bottom: 10px; /* Increased space between text and arrow */
  color: #fff;
}

.scroll-down i {
  font-size: 1.5rem;
  color: #fff;
  animation: bounce 1.5s infinite; /* Arrow bounce animation */
}

/* Bounce Animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0); /* Default position */
  }
  50% {
    transform: translateY(-10px); /* Moves up slightly */
  }
}

.projects-section {
  text-align: center;
  margin: 60px auto 40px; /* Increased space above and below the heading */

  background-color: #040104;
}

.projects-section h2 {
  font-size: 2.5rem;
  color: #fff; /* Match the color scheme */
  font-weight: bold;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #7c52f9; /* Optional underline effect */
  display: inline-block;
}

.card-container {
  display: flex;
  gap: 20px; /* Spacing between the cards */
  justify-content: center; /* Center cards horizontally */
  flex-wrap: wrap; /* Ensure cards wrap to the next line on smaller screens */
  margin: 0 auto; /* Remove default margin affecting alignment */
  padding: 40px 20px; /* Add padding for spacing within the section */
  background-color: #040104; /* Updated background color */
  max-width: 100%; /* Ensure the section takes up full width */
  border-radius: 0; /* Remove border-radius to make it seamless */
  height: auto; /* Automatically adjusts to fit content */
}

.card-container {
  margin-bottom: 100px; /* Increased space below the cards */
}

.card {
  background-color: #290f77; /* Retain your preferred color scheme */
  border-radius: 15px !important;
  padding: 30px;
  width: 400px; /* Adjust card width for better alignment */
  height: auto; /* Allow card height to adjust based on content */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: scale(1);
}

.card:hover {
  transform: scale(1.05); /* Hover scaling */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.card-image {
  width: 100%; /* Ensure images fit the card width */
  border-radius: 10px;
  height: 180px; /* Set consistent image height */
  object-fit: cover;
  margin-bottom: 20px;
}

.card-button {
  --color: #7c52f9; /* Updated to your preferred color scheme */
  padding: 0.8em 1.7em;
  background-color: transparent;
  border-radius: 0.3em;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: 0.4s ease-in-out;
  font-weight: 600;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  color: var(--color);
  z-index: 1;
  border: 2px solid var(--color);
  text-align: center;
  text-decoration: none;
}

.card-button::before,
.card-button::after {
  content: '';
  display: block;
  width: 50px;
  height: 50px;
  transform: translate(-50%, -50%);
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  background-color: var(--color);
  transition: 1s ease;
}

.card-button::before {
  top: -1em;
  left: -1em;
}

.card-button::after {
  left: calc(100% + 1em);
  top: calc(100% + 1em);
}

.card-button:hover::before,
.card-button:hover::after {
  height: 410px;
  width: 410px;
}

.card-button:hover {
  color: #fff; /* White text on hover */
  background-color: var(--color); /* Button background matches hover effect */
  box-shadow: 0px 8px 15px rgba(124, 82, 249, 0.6); /* Subtle shadow effect */
  transform: scale(1.05);
  text-decoration: none;
}


.card-button:active {
  filter: brightness(0.8); /* Darken button when pressed */
}


/* Footer Section */
.footer {
  background: linear-gradient(135deg, #290f77, #7c52f9);
  color: #fff;
  padding: 50px 20px 20px;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-about,
.footer-social {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.footer-about h3 {
  font-size: 2rem;
  margin-bottom: 15px;
  font-weight: bold;
  text-transform: uppercase;
}

.footer-about p {
  font-size: 1rem;
  color: #e0e0e0;
  line-height: 1.6;
}

.footer-social h4 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: bold;
  color: #f0f0f0;
}

.social-icons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 10px;
}

.social-icons a {
  color: #fff;
  font-size: 1.8rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
  color: #ffde13;
  transform: scale(1.2);
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 15px;
  font-size: 1rem;
  color: #d0d0d0;
}

.footer-bottom i {
  color: #ffde13;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
