/* CSS Variables - Coach Website */
:root {
  /* Colors */
  --bg: #F5F1EA;
  --text: #1F1F1F;
  --ink: #2C3442;
  --taco: #C45A36;
  --sage: #80A08A;
  --blue: #8AA6C1;
  --rose: #E8C8C2;

  /* Border Radius */
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-xl: 32px;

  /* Spacing Scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  /* Typography - Epilogue Optimized Scale */
  --font-size-sm: 16px;
  --font-size-base: 18px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --font-size-2xl: 28px;
  --font-size-3xl: 36px;
  --font-size-4xl: 40px;
  --font-size-5xl: 48px;

  /* Container Widths */
  --container-sm: 540px;
  --container-md: 720px;
  --container-lg: 960px;
  --container-xl: 1140px;
  --container-2xl: 1280px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Epilogue', sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

body {
  font-family: 'Epilogue', sans-serif;
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography - Epilogue Optimized */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Epilogue', sans-serif;
  letter-spacing: 0.5px;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--space-2);
}

p {
  font-family: 'Epilogue', sans-serif;
  font-weight: 400;
  font-size: var(--font-size-lg);
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: var(--space-3);
  word-break: break-word;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: all 0.2s ease-out;
}

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

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-m);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-2xl);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.container-lg {
  max-width: var(--container-xl);
}

.container-md {
  max-width: var(--container-lg);
}

.container-sm {
  max-width: var(--container-md);
}

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--space-2));
}

.col {
  flex: 1;
  padding: 0 var(--space-2);
}

.col-12 { flex: 0 0 100%; }
.col-6 { flex: 0 0 50%; }
.col-4 { flex: 0 0 33.333%; }
.col-3 { flex: 0 0 25%; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 28px;
  font-family: 'Epilogue', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
}

.btn-primary {
  background-color: var(--taco);
  color: white;
  border-color: var(--taco);
}

.btn-primary:hover {
  background-color: #b14a2e;
  border-color: #b14a2e;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(196, 90, 54, 0.25);
  color: white;
}

.btn-outline {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline:hover {
  background-color: rgba(44, 52, 66, 0.05);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-light {
  background-color: white;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

/* Cards */
.card {
  background-color: white;
  border-radius: var(--radius-l);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease-out;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-body {
  margin-bottom: var(--space-4);
}

.card-footer {
  padding-top: var(--space-3);
  border-top: 1px solid #f0f0f0;
}

/* Sections */
.section {
  padding: var(--space-6) 0;
}

.section-lg {
  padding: calc(var(--space-6) * 1.5) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-6);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text);
  margin-top: var(--space-2);
  opacity: 0.8;
}

/* Hero Sections */
.hero {
  padding: calc(var(--space-6) * 2) 0;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-5);
  opacity: 0.9;
}

/* Header */
.header {
  background-color: rgba(245, 241, 234, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-3) 0;
  transition: all 0.3s ease-out;
  box-shadow: 0 2px 10px rgba(31, 31, 31, 0.05);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--taco);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-link {
  font-weight: 500;
  position: relative;
  padding: var(--space-2) var(--space-1);
  font-size: 15px;
}

.nav-link.active {
  color: var(--taco);
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--taco);
  transition: width 0.2s ease-out;
}

.nav-link:hover:after,
.nav-link.active:after {
  width: 100%;
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.2s ease-out;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2) 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease-out;
  border: 1px solid rgba(44, 52, 66, 0.1);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease-out;
  font-size: 14px;
}

.dropdown-item:hover {
  background-color: rgba(196, 90, 54, 0.1);
  color: var(--taco);
  padding-left: calc(var(--space-3) + 4px);
}

/* Auth Navigation */
.nav-auth {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: var(--space-3);
  padding-left: var(--space-3);
  border-left: 1px solid rgba(44, 52, 66, 0.2);
}

.btn-sm {
  padding: 10px 16px;
  font-size: 14px;
}

/* Footer */
.footer {
  background-color: var(--ink);
  color: white;
  padding: var(--space-6) 0 var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--space-3);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-4);
  text-align: center;
  opacity: 0.7;
}

/* Decorative Elements */
.dot-pattern {
  position: absolute;
  width: 100px;
  height: 100px;
  opacity: 0.1;
}

.dot-pattern::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, var(--taco) 2px, transparent 2px);
  background-size: 20px 20px;
}

.circle-accent {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
}

.circle-accent.taco {
  background-color: var(--taco);
}

.circle-accent.sage {
  background-color: var(--sage);
}

.circle-accent.blue {
  background-color: var(--blue);
}

.circle-accent.rose {
  background-color: var(--rose);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Responsive Breakpoints */
@media (max-width: 1199px) {
  .container {
    max-width: var(--container-xl);
  }

  .hero-title {
    font-size: var(--font-size-4xl);
  }
}

@media (max-width: 991px) {
  .container {
    max-width: var(--container-lg);
  }

  .col-md-12 { flex: 0 0 100%; }
  .col-md-6 { flex: 0 0 50%; }
  .col-md-4 { flex: 0 0 33.333%; }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .nav {
    gap: var(--space-3);
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 var(--space-2);
  }

  .col-sm-12 { flex: 0 0 100%; }

  h1, .hero-title {
    font-size: 32px;
    line-height: 1.2;
  }

  h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    line-height: 1.3;
  }

  h3 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  }

  /* Spacing Adjustments for Mobile */
  .section {
    padding: var(--space-4) 0;
  }

  .hero {
    padding: var(--space-5) 0;
  }

  /* Mobile Typography Override */
  body {
    font-size: var(--font-size-base);
  }

  /* Mobile Button Full Width */
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .btn {
    min-width: 100%;
  }


  .card {
    padding: var(--space-4);
  }

  .nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  color: var(--ink);
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background-color: var(--bg);
  z-index: 1001;
  transition: left 0.3s ease-out;
  padding: var(--space-5);
}

.mobile-menu.open {
  left: 0;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.mobile-nav .nav-link {
  font-size: var(--font-size-xl);
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(44, 52, 66, 0.1);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 500;
  color: var(--ink);
}

.form-control {
  width: 100%;
  padding: 12px var(--space-2);
  border: 1.5px solid #e0e0e0;
  border-radius: var(--radius-s);
  font-size: var(--font-size-base);
  transition: all 0.2s ease-out;
  background-color: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--taco);
  box-shadow: 0 0 0 3px rgba(196, 90, 54, 0.1);
}

.form-control.error {
  border-color: #e53e3e;
}

.form-error {
  color: #e53e3e;
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

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