@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;700;900&display=swap');



html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Exo 2', sans-serif;
  color: #000;
  overflow-x: hidden;
  padding-top: 80px; /* Prevents content from hiding under fixed navbar */
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1583454110551-21f2fa2afe61');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.85; /* Increased for prominence */
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2); /* Lighter overlay for more visible image */
  z-index: -1;
}

.navbar {
  background: linear-gradient(to right, rgba(0, 206, 209, 0.8), rgba(255, 215, 0, 0.8));
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 1rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: spinIn 1s ease-out;
  overflow-x: visible;
}

@keyframes spinIn {
  0% { transform: rotateY(90deg); opacity: 0; }
  100% { transform: rotateY(0); opacity: 1; }
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 10px #c71585, 0 2px 4px #000;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-left: 1rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  transition: text-shadow 0.3s, transform 0.3s;
  text-shadow: 0 2px 4px #000;
}

.nav-links a:hover, .nav-links a.active {
  text-shadow: 0 0 10px #00ced1, 0 2px 4px #000;
  transform: translateY(-3px);
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.nav-toggle {
  display: none;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
}

.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.carousel {
  position: relative;
  height: 100%;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: perspective(1000px) rotateY(45deg);
  transition: opacity 0.8s ease-in-out, transform 1s ease-in-out;
  animation: shakeSlide 5s infinite;
}

@keyframes shakeSlide {
  0%, 100% { transform: perspective(1000px) rotateY(45deg); }
  50% { transform: perspective(1000px) rotateY(48deg); }
}

.carousel-item.active {
  opacity: 1;
  transform: perspective(1000px) rotateY(0);
}

.carousel-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 2.5rem;
  border-radius: 15px;
  animation: flipIn 1s ease-out;
}

@keyframes flipIn {
  0% { transform: translate(-50%, -50%) rotateX(90deg); opacity: 0; }
  100% { transform: translate(-50%, -50%) rotateX(0); opacity: 1; }
}

.carousel-text h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: #fff;
  text-shadow: 0 0 15px #ff4500, 0 2px 4px #000;
  animation: shake 2s infinite;
}

.carousel-text p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: #fff;
  text-shadow: 0 2px 4px #000;
}

.carousel-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.dot {
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.dot:hover, .dot.active {
  background: #00ced1;
  transform: scale(1.4);
  box-shadow: 0 0 15px #00ced1;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: #00ced1;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  animation: pulseButton 1.5s infinite;
  text-shadow: 0 1px 2px #fff;
}

@keyframes pulseButton {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px #00ced1; }
  50% { transform: scale(1.07); box-shadow: 0 0 20px #00ced1; }
}

.btn:hover {
  background: #c71585;
  transform: rotate(5deg) scale(1.2);
  box-shadow: 0 0 25px #c71585;
  animation: shake 0.3s;
}

section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

h1 {
  font-size: 3rem;
  margin-bottom: 2.5rem;
  color: #fff;
  text-shadow: 0 0 15px #c71585, 0 2px 4px #000;
  animation: shake 2s infinite;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(100px) rotate(10deg);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.about .parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.5;
  z-index: -1;
  animation: pulseBg 5s infinite;
}

@keyframes pulseBg {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.7; }
}

.about .content {
  background: rgba(255, 255, 255, 0.4);
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 0 20px #ff4500;
}

.class-grid, .trainer-grid, .membership-grid, .gallery-grid, .blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.class-card, .trainer-card, .membership-card, .blog-card {
  background: rgba(255, 255, 255, 0.4);
  padding: 2rem;
  border-radius: 15px;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.class-card:hover, .trainer-card:hover, .membership-card:hover, .blog-card:hover {
  transform: translateY(-20px) rotate(5deg);
  box-shadow: 0 0 30px #00ced1;
  animation: shake 0.3s;
}

.class-card img, .trainer-card img, .membership-card img, .gallery-grid img, .blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  transition: transform 0.6s ease;
}

.class-card:hover img, .trainer-card:hover img, .blog-card:hover img {
  transform: perspective(1000px) rotateX(10deg);
}

.class-card p, .trainer-card p, .membership-card p, .blog-card p {
  text-shadow: 0 2px 4px #000;
}

.price {
  font-size: 1.4rem;
  color: #ffd700;
  margin: 1.5rem 0;
  text-shadow: 0 0 10px #ffd700, 0 2px 4px #000;
}

.gallery-grid img {
  border-radius: 10px;
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.gallery-grid img:hover {
  transform: perspective(1000px) rotateX(-10deg);
  box-shadow: 0 0 25px #c71585;
}

.contact-form {
  max-width: 700px;
  margin: 2.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-form input, .contact-form textarea {
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  color: #000;
  font-family: 'Exo 2', sans-serif;
  transition: box-shadow 0.3s, transform 0.3s;
}

.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 15px #00ced1;
  transform: rotate(3deg);
}

.contact-form textarea {
  height: 180px;
  resize: vertical;
}

.contact-info {
  margin-top: 3rem;
}

.contact-info p {
  text-shadow: 0 2px 4px #48e20b;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem;
  background: linear-gradient(to right, #ff4500, #00ced1);
}

.footer-content h3 {
  color: #fff;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px #c71585, 0 2px 4px #000;
}

.footer-content p, .footer-content a {
  color: #fff;
  margin: 0.5rem 0;
  font-weight: 400;
  text-shadow: 0 2px 4px #000;
}

.footer-content a:hover {
  text-shadow: 0 0 10px #ffd700, 0 2px 4px #000;
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 4px #000;
}

@media (max-width: 768px) {
  body::before {
    background-attachment: scroll;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, #ff4500, #00ced1);
    padding: 1.5rem;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    height: 70vh;
  }

  .carousel-text h1 {
    font-size: 2.2rem;
  }

  .carousel-text p {
    font-size: 1.1rem;
  }

  .about .parallax-bg {
    background-attachment: scroll;
  }

  h1 {
    font-size: 2rem;
  }
}