@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #34D399;
  --secondary-color: #3B82F6;
  --text-color: #1F2937;
  --bg-color: #F3F4F6;
  --border-color: #E5E7EB;
}

/* Animations */
@keyframes scaleAnimation {
  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* General Styles */
body {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 3.75rem 0 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-color);
}

p {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-color);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  z-index: 100;
  transition: background-color 0.3s ease;
}

header.scrolled {
  background-color: var(--primary-color);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

main {
  max-width: 75rem;
  margin: 0 auto;
  padding: 1.25rem;
  transition: color 0.3s ease;
}

/* Custom Cursor */
.custom-cursor {
  cursor: none;
}

#custom-cursor {
  width: 1.25rem;
  height: 1.25rem;
  border: 0.125rem solid var(--primary-color);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease-out;
  transform: translate(-50%, -50%);
}

/* Hover Animation */
.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-0.1875rem);
}

/* SVG Animation */
.svg-animate path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 3s linear forwards;
}

/* Text Animation */
.text-animate {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.625rem);
  transition: opacity 0.5s, transform 0.5s;
}

.text-animate.active {
  opacity: 1;
  transform: translateY(0);
}

/* Animated Background */
#animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  background-size: 200% 200%;
  animation: gradient 30s ease infinite;
}

/* Parallax Section */
.parallax-section {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0.5rem 2rem 0 rgba(31, 38, 135, 0.37);
  -webkit-backdrop-filter: blur(0.25rem);
  backdrop-filter: blur(0.25rem);
  border-radius: 0.625rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.18);
}

/* 3D Card Flip */
.card-3d {
  perspective: 1000px;
  height: 20rem;
  width: 100%;
  margin: 0 auto;
}

.card-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
  transform: rotateY(180deg);
}

.card-3d-front,
.card-3d-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-radius: 0.625rem;
  background-color: white;
  box-shadow: 0 0.5rem 2rem 0 rgba(31, 38, 135, 0.1);
}

.card-3d-back {
  transform: rotateY(180deg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 0.625rem;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 0.3125rem;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Animated CTA Button */
.cta-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.7s ease;
}

.cta-button:hover::before {
  left: 100%;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.fade-out {
  opacity: 0;
}

/* Responsive Grid Layout */
.advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
  gap: 1rem;
}

/* Micro-interactions */
.pulse {
  animation: pulse 4s infinite;
}

.pulse-once {
  animation: pulse 0.5s;
}

/* Hero Section */
.hero-section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
  text-align: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(0.625rem);
  backdrop-filter: blur(0.625rem);
}

.hero-section h1,
.hero-section p {
  position: relative;
  z-index: 1;
  color: #fff;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-section p {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Slideshow */
#slideshow {
  background-size: cover;
  background-position: center;
  transition: background-image 1s ease-in-out;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav a {
  color: #fff;
  font-size: 1.5rem;
}

.mobile-nav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

/* Gallery Section */
#photos img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#photos img:hover {
  transform: scale(1.03);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Routines Section */
.routine i {
  transition: transform 0.3s ease;
}

.routine:hover i {
  transform: scale(1.2);
}

/* Videos Section */
.video .play-button {
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.video:hover .play-button {
  opacity: 1;
  transform: scale(1.1);
}

/* Nutrition Tips */
.tip i {
  display: block;
  margin: 0 auto 1rem;
  text-align: center;
}

/* Contact Form */
#contact-form input,
#contact-form textarea {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
  background-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 0.125rem var(--primary-color);
}

/* Media Queries */
@media (max-width: 64rem) {
  .advanced-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-section p {
    font-size: 1.3rem;
  }
}

@media (max-width: 48rem) {
  .advanced-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-3d {
    height: 18rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1.2rem;
  }

  #custom-cursor {
    display: none;
  }

  .parallax-section {
    height: 50vh;
    background-attachment: scroll;
  }
}

@media (max-width: 30rem) {
  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .card-3d {
    height: 16rem;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .parallax-section {
    height: 40vh;
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
  opacity: 0;
  transform: translateY(2rem);
  animation: slideUp 0.8s ease forwards;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accessibility Improvements */
:focus {
  outline: 0.125rem solid var(--primary-color);
  outline-offset: 0.125rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}