*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: initial; /* Lenis handles this */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  letter-spacing: 1px;
}

h1 { font-size: clamp(3rem, 8vw, 6rem); }
h2 { font-size: clamp(2.5rem, 5vw, 4rem); }
h3 { font-size: clamp(2rem, 4vw, 3rem); }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul {
  list-style: none;
}

img, video {
  max-width: 100%;
  display: block;
}

.text-center { text-align: center; }

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-xxl) 0;
  position: relative;
}

.section-header {
  margin-bottom: var(--spacing-xl);
}

.text-accent {
  color: var(--accent-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent-color);
}

.btn-outline:hover {
  background: var(--accent-color);
  box-shadow: var(--shadow-glow);
}

/* Glassmorphism Classes */
.glass {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end; /* Locks it securely at bottom */
  padding-bottom: 8rem;
  overflow: hidden;
  padding-top: 100px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: var(--spacing-sm);
}

.hero-subtext {
  font-size: 1.25rem;
  color: #ccc;
  margin-bottom: var(--spacing-lg);
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

/* --- STATS SECTION --- */
.stats-section {
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-card h2 {
  font-size: 3.5rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.stat-card p {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

/* --- GOALS / TABS SECTION --- */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  position: relative;
  transition: color 0.3s;
}

.tab-btn:hover, .tab-btn.active {
  color: var(--text-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -18px; /* Cover the border bottom */
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.goal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.goal-features {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.goal-features li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
}

.goal-features li::before {
  content: '→';
  color: var(--accent-color);
  font-weight: bold;
}

.parallax-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 500px;
}

.parallax-img {
  width: 100%;
  height: 140%; /* Taller for parallax room */
  object-fit: cover;
}

/* --- TRANSFORMATION SLIDER --- */
.slider-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.before-after-slider {
  position: relative;
  height: 600px;
  width: 100%;
  user-select: none;
  cursor: ew-resize;
}

.image-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-before-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%; /* Initial state */
  height: 100%;
  overflow: hidden;
}

.image-before {
  width: 1000px; /* Should match container width to prevent stretching, but we use object-fit */
  height: 100%;
  object-fit: cover;
  object-position: left;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background-color: var(--accent-color);
  transform: translateX(-50%);
  pointer-events: none;
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  pointer-events: auto;
}

/* --- CTA SECTION --- */
.cta-section {
  background-image: url('assets/images/trainers/trainer_1.png'); /* Dynamic fallback */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
  text-align: center;
}

.cta-overlay {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem;
  border-radius: var(--radius-lg);
}

.cta-overlay p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

/* Lenis Recommended */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-scroll-container] {
  will-change: transform;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}
