:root {
  --primary: #5c1a1a;
  --primary-dark: #3a0f0f;
  --bg: #f2f2f2;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --muted: #5e5e5e;
  --accent: #4a4a4a;
  --radius: 14px;
  --shadow: 0 4px 14px rgba(0,0,0,0.06);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ---------- Header / Nav ---------- */
header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
}

.logo-img {
  height: 64px;
  width: auto;
  display: block;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

nav a {
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

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

.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  min-width: 200px;
  padding-top: 0.5rem;
}

.dropdown-menu > li:first-child > a {
  margin-top: 0.5rem;
}

.dropdown-menu li a {
  background: var(--card-bg);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1.2rem;
}

.dropdown-menu li a:hover {
  background: var(--bg);
}

.btn {
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s;
  display: inline-block;
}

.btn:hover { background: var(--primary-dark); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 3rem 1.5rem;
  position: relative;
  background:
    linear-gradient(135deg, rgba(58,15,15,0.75), rgba(92,26,26,0.65)),
    url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1600&q=80')
      center/cover no-repeat;
  color: #fff;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero-logo {
  max-width: 800px;
  width: 100%;
  margin: 0 auto 0.5rem;
  display: block;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: #fff;
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
}

/* ---------- Coach Banner ---------- */
.coach-banner {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.coach-banner-top {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.coach-banner-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 4px solid var(--primary);
  flex-shrink: 0;
}

.coach-banner-text {
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.coach-banner-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.coach-banner-logos img {
  height: 90px;
  width: auto;
}

/* ---------- Widget Grid ---------- */
.widget-grid {
  max-width: 1200px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.widget-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.8rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-top: 4px solid var(--primary);
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.widget-grid .widget-card:nth-child(1) { animation-delay: 0s; }
.widget-grid .widget-card:nth-child(2) { animation-delay: -0.5s; }
.widget-grid .widget-card:nth-child(3) { animation-delay: -1s; }
.widget-grid .widget-card:nth-child(4) { animation-delay: -1.5s; }
.widget-grid .widget-card:nth-child(5) { animation-delay: -2s; }
.widget-grid .widget-card:nth-child(6) { animation-delay: -2.5s; }
.widget-grid .widget-card:nth-child(7) { animation-delay: -3s; }
.widget-grid .widget-card:nth-child(8) { animation-delay: -3.5s; }
.widget-grid .widget-card:nth-child(9) { animation-delay: -4s; }
.widget-grid .widget-card:nth-child(10) { animation-delay: -4.5s; }
.widget-grid .widget-card:nth-child(11) { animation-delay: -5s; }
.widget-grid .widget-card:nth-child(12) { animation-delay: -5.5s; }

.widget-card::after {
  content: "→";
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.widget-card:hover {
  animation-play-state: paused;
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  z-index: 2;
}

.widget-card .icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.widget-card h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.widget-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Section blocks ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section h2 {
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  padding-bottom: 0.3rem;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-placeholder {
  margin-top: 0.6rem;
  height: 160px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
  background: var(--bg);
}

.module-upsell {
  text-align: center;
  border-top: 2px solid var(--bg);
  padding-top: 1.2rem;
  margin-top: 0.5rem;
}

.card .thumb {
  background: var(--accent);
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
}

.card-body {
  padding: 1.2rem;
}

.card-body h4 { margin-bottom: 0.4rem; color: var(--primary-dark); }
.card-body p { color: var(--muted); font-size: 0.9rem; }
.card-body .meta { font-size: 0.8rem; color: #999; margin-top: 0.6rem; }

/* ---------- Topic Page ---------- */
.topic-hero {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 3rem 1.5rem;
}

.topic-hero h1 { font-size: 2.4rem; margin-bottom: 0.5rem; }
.topic-hero p { opacity: 0.9; }

.module-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.module-list { display: flex; flex-direction: column; gap: 0.8rem; }

.module {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.module-summary {
  list-style: none;
  cursor: pointer;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.module-summary::-webkit-details-marker { display: none; }

.module-summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.module[open] .module-summary::after {
  content: "−";
}

.module .module-num {
  background: var(--primary);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.module-title { font-weight: 700; color: var(--primary-dark); }

.module-body { padding: 0 1.5rem 1.2rem 1.5rem; }
.module-body p { font-size: 0.88rem; color: var(--muted); }
.module-info h4 { color: var(--primary-dark); }
.module-info p { font-size: 0.88rem; color: var(--muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.tag {
  background: var(--bg);
  border: 1px solid #ddd;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Schedule Page ---------- */
.pricing-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.price-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
}

.price-card .price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0.6rem 0;
}

form {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 500px;
  margin: 1.5rem auto 0;
  display: grid;
  gap: 1rem;
}

form label { font-weight: 600; font-size: 0.9rem; }
form input, form select, form textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
}

/* ---------- Coach / About Me ---------- */
.coach-section {
  max-width: 1000px;
}

.coach {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  border-left: 5px solid var(--primary);
}

.coach-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 4px solid var(--primary);
  box-shadow: var(--shadow);
  margin: 0 auto;
  display: block;
}

.coach-social {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
}

.coach-social a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.coach-social a:hover { color: var(--primary-dark); text-decoration: underline; }

.coach-bio h3 {
  color: var(--primary-dark);
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.coach-title {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.coach-bio p { color: var(--text); margin-bottom: 0.9rem; }

@media (max-width: 700px) {
  .coach { grid-template-columns: 1fr; text-align: center; }
}

/* ---------- Footer ---------- */
footer {
  background: var(--primary-dark);
  color: #fff;
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

footer a { text-decoration: underline; }

.nav-close {
  display: none;
}

.nav-auth-mobile {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--primary-dark);
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 768px) {
  .nav-container { flex-wrap: wrap; justify-content: space-between; }
  .nav-toggle { display: block; order: 1; }
  .logo { order: 2; font-size: 1.2rem; }
  .logo-img { height: 56px; }
  nav ul > li#nav-login,
  nav ul > li#nav-join {
    display: none;
  }
  .nav-auth-mobile {
    display: flex;
    order: 3;
    align-items: center;
    gap: 0.6rem;
  }
  .nav-auth-mobile .nav-auth-join {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
  }
  .nav-auth-mobile .nav-auth-login {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
  }
  header nav {
    display: none;
    width: 100%;
    order: 3;
  }
  header nav.open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 200;
    overflow-y: auto;
    padding-top: 1.2rem;
  }
  header nav.open .nav-close {
    display: block;
    margin: 0 1.5rem 0.5rem auto;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--primary-dark);
    cursor: pointer;
  }
  nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 0.5rem 0 1rem;
  }
  nav ul > li {
    width: 100%;
    border-bottom: 1px solid var(--bg);
    padding: 1rem 1.5rem;
  }
  nav ul > li:last-child { border-bottom: none; }
  nav ul > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
  }
  nav ul > li > a.btn {
    text-align: center;
    justify-content: center;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding: 0.8rem 0 0 1rem;
  }
  .dropdown-menu li a {
    padding: 0.6rem 0;
  }
  .coach-banner { flex-direction: column; justify-content: center; gap: 0.6rem; }
  .coach-banner-top { flex-wrap: nowrap; gap: 0.8rem; }
  .coach-banner-text { font-size: 1.35rem; }
  .coach-banner-logos { flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: -0.5rem; }
  .coach-banner-logos img { height: 100px; }
  .coach-banner-photo { width: 70px; height: 70px; }
  .coach-banner-text { font-size: 1rem; }
}
