/* Catalog /courses/ — FlexPro brand, clean listing */

body.post-type-archive-courses {
  --fp-ink: #3b2925;
  --fp-muted: #5c463f;
  --fp-accent: #9a3412;
  --fp-surface: #f7f1ec;
  --fp-card: #fffdfb;
  --fp-line: rgba(59, 41, 37, 0.1);
  background:
    radial-gradient(1200px 480px at 8% -10%, rgba(154, 52, 18, 0.08), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(26, 92, 96, 0.07), transparent 55%),
    linear-gradient(180deg, #faf6f2 0%, var(--fp-surface) 42%, #f3ebe4 100%);
}

body.post-type-archive-courses .site-main,
body.post-type-archive-courses .tutor-wrap,
body.post-type-archive-courses .tutor-courses-wrap {
  background: transparent;
}

body.post-type-archive-courses .tutor-courses-wrap.tutor-container {
  max-width: 1180px;
  padding-top: 8px;
  padding-bottom: 72px;
}

.courses-archive-intro {
  margin: 0 0 28px;
  max-width: 40em;
  animation: fpCoursesIn 0.55s ease both;
}

.courses-archive-intro .results__eyebrow {
  color: var(--fp-accent);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.courses-archive-intro .results__title {
  color: var(--fp-ink);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 12px 0 0;
  text-align: left;
}

.courses-archive-intro .results__lead {
  color: var(--fp-muted);
  font-size: 1.125rem;
  line-height: 1.65;
  margin: 18px 0 0;
  max-width: 36em;
  text-wrap: pretty;
}

.courses-archive-intro .fp-ask {
  margin: 22px 0 0;
}

.courses-archive-intro .fp-ask__btn {
  transition: transform 0.2s ease, background 0.2s ease;
}

.courses-archive-intro .fp-ask__btn:hover {
  transform: translateY(-1px);
}

.courses-archive-heading {
  display: none;
}

/* Level filters */
.flexpro-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 28px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 253, 251, 0.72);
  border: 1px solid var(--fp-line);
  border-radius: 14px;
  animation: fpCoursesIn 0.55s ease 0.08s both;
}

.flexpro-levels button {
  appearance: none;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fp-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.flexpro-levels button:hover {
  color: var(--fp-ink);
  background: rgba(59, 41, 37, 0.05);
}

.flexpro-levels button.is-active {
  background: var(--fp-ink);
  color: #fffdfb;
}

.flexpro-levels-empty {
  margin: 0 0 24px;
  color: var(--fp-muted);
  font-size: 16px;
}

/* Grid */
body.post-type-archive-courses .tutor-course-list.tutor-grid {
  display: grid !important;
  gap: 22px !important;
  width: 100%;
  animation: fpCoursesIn 0.6s ease 0.14s both;
}

body.post-type-archive-courses .tutor-course-list.tutor-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 980px) {
  body.post-type-archive-courses .tutor-course-list.tutor-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  body.post-type-archive-courses .tutor-course-list.tutor-grid-3 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .flexpro-levels {
    width: 100%;
  }
}

.tutor-course-card[hidden] {
  display: none !important;
}

/* Cards */
body.post-type-archive-courses .tutor-course-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 100%;
  background: var(--fp-card);
  border: 1px solid var(--fp-line);
  border-radius: 16px;
  box-shadow: none;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

body.post-type-archive-courses .tutor-course-card:hover {
  border-color: rgba(154, 52, 18, 0.28);
  box-shadow: 0 18px 40px rgba(59, 41, 37, 0.08);
  transform: translateY(-3px);
}

body.post-type-archive-courses .tutor-course-thumbnail {
  position: relative;
}

body.post-type-archive-courses .tutor-course-thumbnail .tutor-ratio {
  background: #e8ddd4;
}

body.post-type-archive-courses .tutor-course-thumbnail img {
  transition: transform 0.45s ease;
}

body.post-type-archive-courses .tutor-course-card:hover .tutor-course-thumbnail img {
  transform: scale(1.03);
}

body.post-type-archive-courses .tutor-course-bookmark {
  display: none;
}

body.post-type-archive-courses .tutor-course-ratings {
  display: none;
}

body.post-type-archive-courses .tutor-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 10px;
}

.flexpro-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flexpro-level {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 4px 9px;
  border-radius: 8px;
  background: #fae3b1;
  color: var(--fp-ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.flexpro-level--mid {
  background: #f3d2c4;
}

.flexpro-level--pro {
  background: var(--fp-ink);
  color: #fff;
}

.flexpro-level--continue {
  background: #1a5c60;
  color: #fff;
}

.flexpro-level--testy {
  background: #673c33;
  color: #fff;
}

.flexpro-cat {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--fp-line);
  border-radius: 8px;
  background: transparent;
  color: var(--fp-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

body.post-type-archive-courses .tutor-course-name {
  color: var(--fp-ink);
  display: -webkit-box;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body.post-type-archive-courses .tutor-course-name a {
  color: inherit;
  text-decoration: none;
}

body.post-type-archive-courses .tutor-course-name a:hover {
  color: var(--fp-accent);
}

/* One-line teaser instead of full brief */
body.post-type-archive-courses .fp-course-brief {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.post-type-archive-courses .fp-course-brief p {
  display: none;
  margin: 0;
  color: var(--fp-muted);
  font-size: 14px;
  line-height: 1.45;
}

body.post-type-archive-courses .fp-course-brief p:first-child {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body.post-type-archive-courses .fp-course-brief p:first-child span {
  display: none;
}

body.post-type-archive-courses .tutor-meta.tutor-mt-auto,
body.post-type-archive-courses .tutor-meta.tutor-mt-12 {
  display: none;
}

body.post-type-archive-courses .tutor-card-footer {
  margin-top: auto;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--fp-line);
}

body.post-type-archive-courses .tutor-card-footer > .tutor-d-flex {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
}

body.post-type-archive-courses .list-item-price,
body.post-type-archive-courses .price {
  color: var(--fp-ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
}

body.post-type-archive-courses .woocommerce-Price-amount {
  font-weight: 700;
}

body.post-type-archive-courses .woocommerce-price-suffix {
  display: inline;
  margin-left: 4px;
  color: var(--fp-muted);
  font-size: 12px;
  font-weight: 500;
}

body.post-type-archive-courses .list-item-button {
  flex: 0 0 auto;
  margin-left: 0;
  width: 100%;
}

body.post-type-archive-courses .tutor-btn {
  border-radius: 11px;
  justify-content: center;
  padding: 10px 14px;
  white-space: nowrap;
  width: 100%;
  transition: background 0.2s ease, transform 0.2s ease;
}

body.post-type-archive-courses .tutor-btn:hover {
  transform: translateY(-1px);
}

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

@media (prefers-reduced-motion: reduce) {
  .courses-archive-intro,
  .flexpro-levels,
  body.post-type-archive-courses .tutor-course-list.tutor-grid,
  body.post-type-archive-courses .tutor-course-card,
  body.post-type-archive-courses .tutor-course-thumbnail img,
  body.post-type-archive-courses .tutor-btn,
  .courses-archive-intro .fp-ask__btn {
    animation: none !important;
    transition: none !important;
  }

  body.post-type-archive-courses .tutor-course-card:hover {
    transform: none;
  }

  body.post-type-archive-courses .tutor-course-card:hover .tutor-course-thumbnail img {
    transform: none;
  }
}

/* Hide Tutor default sort/filter chrome on archive */
body.post-type-archive-courses .tutor-course-filter-wrapper,
body.post-type-archive-courses .tutor-course-filter,
body.post-type-archive-courses .tutor-course-archive-filters-wrapper,
body.post-type-archive-courses select.tutor-form-select,
body.post-type-archive-courses .tutor-course-filter-form,
body.post-type-archive-courses .tutor-courses-top,
body.post-type-archive-courses .tutor-archive-course-top {
  display: none !important;
}

body.post-type-archive-courses .tutor-course-filter,
body.post-type-archive-courses form:has([name="course_order"]) {
  display: none !important;
}
