/* Course page (templates/single-course.php).
 * Order on phones/tablets: title band, "Choose your class", enroll card,
 * about, question form, other courses. Desktop (>= 1024px): picker and
 * about on the left, enroll card on the right. A bottom Enroll bar appears
 * once the enroll card has scrolled out of view (all sizes). */

.ares-course {
  --c-navy-900: #002f4f;
  --c-navy: #1d506d;
  --c-blue: #048bce;
  --c-blue-dark: #0373ab;
  --c-blue-50: #eef7fc;
  --c-gold: #f7c500;
  --c-ink: #1f2933;
  --c-muted: #52606d;
  --c-line: #dfe5ec;
  --c-surface: #f5f7fa;
  --c-radius: 14px;
  --c-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 20px rgba(16, 24, 40, .08);
  --c-gutter: 16px;
  font-family: Montserrat, Arial, sans-serif;
  color: var(--c-ink);
  font-size: 16px;
  line-height: 1.6;
}
@media (min-width: 768px) { .ares-course { --c-gutter: 24px; } }
.ares-course *, .ares-course *::before, .ares-course *::after { box-sizing: border-box; }

.ares-course__wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: var(--c-gutter);
  padding-right: var(--c-gutter);
}

/* ---- Shared type & buttons ------------------------------------------- */
.ares-course .ares-course__h2 {
  margin: 0 0 6px;
  color: var(--c-navy-900);
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  text-transform: none;
}
.ares-course .ares-course__lead { margin: 0 0 18px; color: var(--c-muted); font-size: 15px; }
.ares-course .ares-course__lead a { color: var(--c-navy); font-weight: 700; text-decoration: none; white-space: nowrap; }
@media (min-width: 768px) { .ares-course .ares-course__h2 { font-size: 26px; } }

.ares-course .ares-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0;
  padding: 12px 24px;
  border: 0;
  border-radius: 10px;
  background: var(--c-blue);
  color: #fff !important;
  font: 700 17px/1.2 Montserrat, Arial, sans-serif;
  text-align: center;
  text-decoration: none !important;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease;
}
.ares-course .ares-btn--block { display: flex; width: 100%; }
.ares-course .ares-btn:hover { background: var(--c-blue-dark); }
.ares-course .ares-btn:focus-visible { outline: 3px solid rgba(4, 139, 206, .45); outline-offset: 2px; }
.ares-course .ares-btn[disabled] { background: #9aa5b1; cursor: not-allowed; }

/* ---- Title band -------------------------------------------------------- */
.ares-course__band {
  background-color: #002f4f;
  background-image: linear-gradient(135deg, #002f4f 0%, #1d506d 100%);
  color: #fff;
  padding: 28px 0 26px;
}
.ares-course .ares-course__eyebrow {
  margin: 0 0 8px;
  color: var(--c-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.3;
  text-transform: uppercase;
}
.ares-course .ares-course__title {
  max-width: 820px;
  margin: 0;
  padding: 0;
  color: #fff !important;
  font-family: inherit;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-transform: none;
}
.ares-course .ares-course__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.ares-course .ares-course__fact {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  list-style: none;
}
.ares-course .ares-course__fact::before { content: none; }
.ares-course__fact-label { display: block; color: rgba(255, 255, 255, .7); font-size: 12px; font-weight: 500; }
.ares-course__icon { flex: none; color: var(--c-gold); }
.ares-course .ares-course__avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .6);
}
@media (min-width: 768px) {
  .ares-course__band { padding: 44px 0 40px; }
  .ares-course .ares-course__title { font-size: 36px; }
}

/* ---- Layout ------------------------------------------------------------ */
.ares-course__layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 24px;
  padding-bottom: 56px;
}
.ares-course__main { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.ares-course__block {
  padding: 22px 18px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--c-radius);
}
@media (min-width: 768px) {
  .ares-course__layout { padding-top: 32px; gap: 32px; }
  .ares-course__main { gap: 32px; }
  .ares-course__block { padding: 30px 32px; }
}
@media (min-width: 1024px) {
  .ares-course__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "picker aside" "main aside";
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    row-gap: 32px;
    align-items: start;
    padding-top: 40px;
    padding-bottom: 80px;
  }
  .ares-picker { grid-area: picker; }
  .ares-course__main { grid-area: main; }
  .ares-course__aside { grid-area: aside; }
  .ares-course__layout.no-picker { grid-template-areas: "main aside"; grid-template-rows: auto; }
}

/* ---- Choose your class -------------------------------------------------- */
.ares-picker__list { display: flex; flex-direction: column; gap: 12px; }
.ares-session {
  padding: 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 12px;
}
.ares-session__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ares-course .ares-session__title { margin: 0; color: var(--c-navy-900); font-size: 17px; font-weight: 700; line-height: 1.3; }
.ares-session__badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--c-gold);
  color: var(--c-navy-900);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.ares-course .ares-session__meta { margin: 4px 0 0; color: var(--c-muted); font-size: 14px; line-height: 1.4; }
.ares-session__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.ares-course .ares-slot { position: relative; display: block; margin: 0; cursor: pointer; font-weight: 400; }
.ares-slot input {
  position: absolute;
  top: 50%;
  left: 20px;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.ares-slot__box {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid #c9d2dc;
  border-radius: 10px;
  transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.ares-slot__check {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  border: 2px solid #9aa5b1;
  border-radius: 50%;
  background: #fff;
}
.ares-slot__name { color: var(--c-ink); font-size: 15px; font-weight: 700; line-height: 1.3; }
.ares-slot__time { grid-column: 2; color: var(--c-muted); font-size: 14px; line-height: 1.3; }
.ares-slot:hover .ares-slot__box { border-color: var(--c-blue); }
.ares-slot input:focus-visible + .ares-slot__box { box-shadow: 0 0 0 3px rgba(4, 139, 206, .35); }
.ares-slot input:checked + .ares-slot__box { border-color: var(--c-blue); background: var(--c-blue-50); box-shadow: 0 0 0 1px var(--c-blue); }
.ares-slot input:checked + .ares-slot__box .ares-slot__check { border-color: var(--c-blue); background: var(--c-blue); box-shadow: inset 0 0 0 4px #fff; }
.ares-picker.is-invalid .ares-slot__box { border-color: #d64545; }

.ares-picker__more { margin-top: 12px; }
.ares-picker__more > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  color: var(--c-navy);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.ares-picker__more > summary::-webkit-details-marker { display: none; }
.ares-picker__more > summary::after { content: "+"; font-size: 18px; line-height: 1; }
.ares-picker__more[open] > summary { margin-bottom: 12px; }
.ares-picker__more[open] > summary::after { content: "\2013"; }

/* ---- Enroll card ------------------------------------------------------- */
.ares-enroll {
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--c-radius);
  box-shadow: var(--c-shadow);
}
@media (min-width: 768px) { .ares-enroll { padding: 26px 24px; } }
.ares-course .ares-enroll__price { display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px; line-height: 1; }
.ares-enroll__amount { color: var(--c-navy-900); font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.ares-enroll__was { color: var(--c-muted); font-size: 17px; }
.ares-enroll__choice {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--c-surface);
  border-radius: 10px;
}
.ares-enroll__choice-label { color: var(--c-muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ares-enroll__choice-value { color: var(--c-ink); font-size: 15px; font-weight: 700; line-height: 1.35; }
.ares-enroll__choice-value.is-empty { color: var(--c-muted); font-weight: 500; }
.ares-course .ares-enroll__form { margin: 0; }
.ares-course .ares-enroll__error { margin: 10px 0 0; color: #b42318; font-size: 14px; font-weight: 600; }
.ares-course .ares-enroll__help { margin: 14px 0 0; color: var(--c-muted); font-size: 14px; text-align: center; }
.ares-course .ares-enroll__help a { color: var(--c-navy); font-weight: 700; text-decoration: none; white-space: nowrap; }

/* ---- About (cleaned course description) --------------------------------- */
.ares-prose { color: var(--c-ink); font-size: 16px; line-height: 1.65; overflow-wrap: break-word; }
.ares-prose > :first-child { margin-top: 0 !important; }
.ares-prose > :last-child { margin-bottom: 0 !important; }
.ares-course .ares-prose h2,
.ares-course .ares-prose h3,
.ares-course .ares-prose h4,
.ares-course .ares-prose h5,
.ares-course .ares-prose h6 {
  margin: 28px 0 8px;
  padding: 0;
  color: var(--c-navy-900);
  font-family: inherit;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}
.ares-course .ares-prose h2 { font-size: 20px; }
.ares-course .ares-prose h3 { font-size: 18px; }
.ares-course .ares-prose h4, .ares-course .ares-prose h5, .ares-course .ares-prose h6 { font-size: 16px; }
.ares-course .ares-prose p { margin: 0 0 14px; color: var(--c-ink); font-size: 16px; line-height: 1.65; }
.ares-course .ares-prose div { margin: 0 0 10px; }
.ares-course .ares-prose ul, .ares-course .ares-prose ol { margin: 0 0 16px; padding-left: 22px; }
.ares-course .ares-prose li { margin: 0 0 6px; color: var(--c-ink); font-size: 16px; line-height: 1.55; }
.ares-course .ares-prose a { color: var(--c-blue-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ares-course .ares-prose strong, .ares-course .ares-prose b { color: var(--c-navy-900); font-weight: 700; }
.ares-course .ares-prose hr { margin: 24px 0; border: 0; border-top: 1px solid var(--c-line); }
.ares-course .ares-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.ares-course .ares-prose iframe { display: block; width: 100%; max-width: 100%; min-height: 280px; margin: 8px 0 16px; border: 0; border-radius: 10px; }
.ares-course .ares-prose table { width: 100%; margin: 0 0 16px; border-collapse: collapse; font-size: 15px; }
.ares-course .ares-prose th, .ares-course .ares-prose td { padding: 10px 12px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.ares-course .ares-prose th { color: var(--c-navy-900); font-weight: 700; }

/* ---- Question form (Contact Form 7) ------------------------------------ */
.ares-course__question .wpcf7 p { margin: 0 0 12px; }
.ares-course__question .wpcf7 input[type="text"],
.ares-course__question .wpcf7 input[type="email"],
.ares-course__question .wpcf7 input[type="tel"],
.ares-course__question .wpcf7 textarea {
  width: 100% !important;
  min-height: 48px;
  padding: 10px 12px !important;
  border: 1px solid #c3ccd6 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--c-ink) !important;
  font: 400 16px/1.4 Montserrat, Arial, sans-serif !important;
}
.ares-course__question .wpcf7 textarea { height: 130px; }
.ares-course__question .wpcf7 input[type="submit"] {
  min-height: 48px;
  padding: 12px 28px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--c-navy) !important;
  color: #fff !important;
  font: 700 16px/1.2 Montserrat, Arial, sans-serif !important;
  cursor: pointer;
}

/* ---- Other courses ----------------------------------------------------- */
.ares-course__related { padding: 48px 0 64px; background: var(--c-surface); border-top: 1px solid var(--c-line); }
.ares-course__related .ares-course__h2 { margin-bottom: 20px; }
.ares-course .ares-course__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ares-course .ares-course__cards li { margin: 0; padding: 0; list-style: none; }
.ares-course .ares-course__cards li::before { content: none; }
@media (min-width: 640px) { .ares-course .ares-course__cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.ares-course .ares-course__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ares-course .ares-course__card:hover { border-color: var(--c-blue); box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.ares-course__card-title { color: var(--c-navy-900); font-size: 16px; font-weight: 700; line-height: 1.3; }
.ares-course__card-meta { color: var(--c-muted); font-size: 13px; line-height: 1.4; }

/* ---- Bottom Enroll bar ------------------------------------------------- */
.ares-enroll-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: #fff;
  border-top: 1px solid var(--c-line);
  box-shadow: 0 -6px 20px rgba(16, 24, 40, .1);
  transform: translateY(110%);
  transition: transform .2s ease;
}
.ares-enroll-bar[hidden] { display: none; }
.ares-enroll-bar.is-shown { transform: none; }
.ares-enroll-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px var(--c-gutter) calc(10px + env(safe-area-inset-bottom));
}
.ares-enroll-bar__info { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.ares-enroll-bar__price { color: var(--c-navy-900); font-size: 19px; font-weight: 800; line-height: 1.2; }
.ares-enroll-bar__choice { overflow: hidden; color: var(--c-muted); font-size: 13px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ares-course .ares-enroll-bar .ares-btn { flex: none; min-height: 48px; padding: 10px 22px; font-size: 16px; }
@media (min-width: 768px) { .ares-course .ares-enroll-bar .ares-btn { min-width: 220px; } }

@media (prefers-reduced-motion: reduce) {
  .ares-enroll-bar, .ares-course .ares-btn, .ares-slot__box, .ares-course .ares-course__card { transition: none; }
}
