/* Front page LMS refresh inspired by reference UI */

.wplms-landing {
  --lms-bg: #f3f7f8;
  --lms-panel: #ffffff;
  --lms-ink: #1f2d2f;
  --lms-muted: #67757a;
  --lms-primary: #1b8a78;
  --lms-secondary: #ef5b6a;
  --lms-accent: #ffd66b;
  --lms-outline: #d8e4e8;
  --lms-shadow: 0 14px 40px rgba(27, 52, 59, 0.12);
  background: var(--lms-bg);
  color: var(--lms-ink);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

.wplms-landing h1,
.wplms-landing h2,
.wplms-landing h3 {
  font-family: "Poppins", "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}

.lms-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--lms-primary);
  font-weight: 700;
}

.lms-btn {
  border-radius: 999px;
  padding: 12px 22px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.lms-btn:hover {
  transform: translateY(-2px);
}

.lms-btn-primary {
  background: var(--lms-primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(27, 138, 120, 0.25);
}

.lms-btn-primary:hover,
.lms-btn-primary:focus {
  color: #fff;
  background: #147463;
}

.lms-btn-ghost {
  background: #fff;
  color: var(--lms-ink);
  border: 1px solid var(--lms-outline);
}

.lms-hero {
  background: linear-gradient(180deg, #f8fbfc 0%, #eef5f6 100%);
  padding: 44px 0 86px;
  position: relative;
}

.lms-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 34px;
  align-items: center;
}

.lms-hero-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04;
  max-width: 580px;
}

.lms-hero-copy > p {
  margin: 14px 0 22px;
  max-width: 560px;
  color: var(--lms-muted);
  font-size: 18px;
  line-height: 1.6;
}

.lms-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 520px;
  margin-bottom: 20px;
}

.lms-search input {
  height: 48px;
  border-radius: 11px;
  border: 1px solid var(--lms-outline);
  background: #fff;
  padding: 0 14px;
  font-size: 15px;
}

.lms-search button {
  border: 0;
  border-radius: 11px;
  background: var(--lms-primary);
  color: #fff;
  font-weight: 700;
  padding: 0 22px;
}

.lms-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lms-hero-art {
  min-height: 400px;
  background: radial-gradient(circle at 35% 30%, #e6f2f8 0%, #d4e6ed 45%, #c7dce4 100%);
  border-radius: 40% 50% 45% 35% / 40% 35% 55% 45%;
  position: relative;
  overflow: hidden;
  background-image: url('../../_inc/images/hero.png');
  background-size: contain;
  background-position: center;
}

.lms-hero-bubble {
  position: absolute;
  inset: 24px;
  border-radius: 44% 56% 62% 38% / 54% 40% 60% 46%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.2));
}

.lms-hero-avatars {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(84%, 400px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.lms-hero-avatars span {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #ddeff4);
  box-shadow: 0 8px 20px rgba(23, 60, 67, 0.14);
  animation: avatarFloat 3.4s ease-in-out infinite;
}

.lms-hero-avatars span:nth-child(2) { animation-delay: 0.25s; }
.lms-hero-avatars span:nth-child(3) { animation-delay: 0.5s; }
.lms-hero-avatars span:nth-child(4) { animation-delay: 0.75s; }

.lms-review-float {
  margin-top: -26px;
  background: #fff;
  border: 1px solid var(--lms-outline);
  border-radius: 24px;
  box-shadow: var(--lms-shadow);
  padding: 16px;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  max-width: 760px;
  animation: liftIn 0.6s ease;
}

.lms-review-score {
  border-right: 1px solid var(--lms-outline);
  display: grid;
  align-content: center;
  text-align: center;
  gap: 4px;
}

.lms-review-score strong {
  font-size: 40px;
  line-height: 1;
  color: var(--lms-primary);
}

.lms-review-content p {
  margin: 0;
  font-weight: 700;
  font-size: 22px;
}

.lms-stars {
  color: #f3b428;
  letter-spacing: 0.12em;
}

.lms-review-content small {
  color: var(--lms-muted);
  line-height: 1.6;
}

.lms-promo-band {
  padding: 56px 0 70px;
  background: linear-gradient(180deg, #f4f9e9 0%, #edf5df 100%);
  position: relative;
}

.lms-promo-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 26px;
  align-items: stretch;
}

.lms-sale-note {
  border: 2px dashed #e3b956;
  border-radius: 26px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.7);
  margin-top: 4rem;
}

.lms-sale-note h2 {
  font-size: clamp(30px, 4vw, 46px);
  margin: 0 0 8px;
  color: #a15d09;
}

.lms-sale-note p {
  max-width: 500px;
  color: #597164;
  font-size: 18px;
}

.lms-coupon-card {
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--lms-outline);
  box-shadow: var(--lms-shadow);
  padding: 24px;
}

.lms-coupon-top {
  margin: 0 0 10px;
  color: var(--lms-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 700;
}

.lms-coupon-code {
  font-size: clamp(28px, 4vw, 42px);
  color: var(--lms-secondary);
  font-weight: 800;
  margin-bottom: 14px;
}

.lms-countdown {
  display: flex;
  gap: 8px;
}

.lms-countdown span {
  flex: 1;
  background: #f7fafb;
  border: 1px solid var(--lms-outline);
  border-radius: 12px;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  color: var(--lms-muted);
}

.lms-countdown strong {
  display: block;
  color: var(--lms-ink);
  font-size: 24px;
  line-height: 1;
}

.lms-membership {
  padding: 60px 0;
}

.lms-membership-box {
  background: linear-gradient(125deg, #dceff2, #d4e3e7);
  border: 1px solid #c8dbde;
  border-radius: 24px;
  box-shadow: var(--lms-shadow);
  padding: 30px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.1fr 0.9fr;
}

.lms-membership-box h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.1;
}

.lms-membership-box p {
  margin: 10px 0 16px;
  max-width: 560px;
  color: #4e666c;
  font-size: 17px;
}

.lms-membership-illustration {
  position: relative;
  min-height: 200px;
}

.lms-membership-illustration span {
  position: absolute;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(42, 75, 81, 0.16);
}

.lms-membership-illustration span:nth-child(1) {
  width: 70%;
  height: 68%;
  top: 12%;
  left: 12%;
  background: linear-gradient(140deg, #fff6dd, #ffd66b);
}

.lms-membership-illustration span:nth-child(2) {
  width: 45%;
  height: 52%;
  top: 4%;
  right: 4%;
  background: linear-gradient(140deg, #fff, #d3eef2);
}

.lms-membership-illustration span:nth-child(3) {
  width: 38%;
  height: 40%;
  bottom: 8%;
  left: 2%;
  background: linear-gradient(140deg, #fff, #d6f3e8);
}

.lms-courses-grid,
.lms-popular-split {
  padding: 18px 0 60px;
}

.lms-featured-stage {
  padding-top: 0;
}

.lms-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.lms-section-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
}

.lms-section-head a {
  text-decoration: none;
  color: var(--lms-primary);
  font-weight: 700;
}

.lms-popular-current {
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(27, 138, 120, 0.1);
  color: var(--lms-primary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.lms-course-card,
.lms-course-tile {
  background: #fff;
  border: 1px solid var(--lms-outline);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(27, 52, 59, 0.08);
  margin-bottom: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lms-featured-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 24px;
  align-items: stretch;
}

.lms-featured-promo {
  min-height: 100%;
  border-radius: 24px;
  border: 1px solid #e6d7bf;
  background: linear-gradient(180deg, #fff8ef 0%, #f4fbf0 100%);
  box-shadow: 0 10px 26px rgba(27, 52, 59, 0.09);
  padding: 22px;
  text-decoration: none;
  color: var(--lms-ink);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.lms-featured-promo-art {
  position: absolute;
  inset: 14px 14px 52px;
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.9), rgba(255, 242, 218, 0.95));
  border-radius: 20px;
}

.lms-featured-promo-art span {
  position: absolute;
  border-radius: 50%;
}

.lms-featured-promo-art span:nth-child(1) {
  width: 66px;
  height: 66px;
  left: 14px;
  bottom: 20px;
  background: #f4ca87;
  box-shadow: 18px 0 0 0 #dfe8d0, 42px 12px 0 0 #f1b4c0;
}

.lms-featured-promo-art span:nth-child(2) {
  width: 48px;
  height: 48px;
  right: 18px;
  bottom: 18px;
  background: #f0d7ab;
}

.lms-featured-promo-art span:nth-child(3) {
  width: 76px;
  height: 76px;
  right: 18px;
  top: 14px;
  background: #f5dfcb;
  opacity: 0.65;
}

.lms-featured-promo strong {
  position: relative;
  z-index: 1;
  font-size: clamp(22px, 3vw, 34px);
  display: block;
  color: #da6d18;
  line-height: 1.1;
}

.lms-featured-promo em {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 12px;
  font-style: normal;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  color: #46505b;
  text-decoration: underline;
  text-decoration-color: #2aa6a2;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.lms-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.lms-featured-card {
  background: #fff;
  border: 1px solid var(--lms-outline);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(27, 52, 59, 0.08);
}

.lms-featured-card .lms-course-thumb {
  aspect-ratio: 16 / 9;
}

.lms-featured-card-body {
  padding: 12px 14px 16px;
}

.lms-featured-card-body h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.35;
}

.lms-featured-card-body h3 a {
  text-decoration: none;
  color: #4f5c61;
}

.lms-featured-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--lms-muted);
  margin-bottom: 12px;
}

.lms-featured-meta span:first-child i {
  color: #1ca39b;
  margin-right: 4px;
}

.lms-featured-card-body p {
  margin: 0 0 14px;
  color: #69767a;
  font-size: 13px;
  line-height: 1.5;
  min-height: 42px;
}

.lms-featured-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.lms-offer-chip {
  background: #f65d55;
  color: #fff;
  font-weight: 800;
  padding: 8px 12px 8px 10px;
  border-radius: 0 999px 999px 0;
  display: inline-flex;
  align-items: center;
  min-width: 92px;
}

.lms-view-chip {
  border: 1px solid var(--lms-outline);
  color: var(--lms-muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  background: #fff;
}

.lms-featured-empty {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px dashed var(--lms-outline);
  border-radius: 18px;
  padding: 28px;
  color: var(--lms-muted);
}

.lms-course-card:hover,
.lms-course-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(27, 52, 59, 0.14);
}

.lms-course-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(140deg, #cce2e7, #e4eff2);
}

.lms-course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lms-thumb-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 15%, #f9ffff, #cce3e8 40%, #aacad2);
}

.lms-course-body,
.lms-course-tile {
  padding: 14px;
}

.lms-course-body h3,
.lms-course-tile h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}

.lms-course-body h3 a,
.lms-course-tile h3 a {
  text-decoration: none;
  color: var(--lms-ink);
}

.lms-course-body p,
.lms-course-tile p {
  margin: 10px 0;
  color: var(--lms-muted);
  line-height: 1.6;
  min-height: 44px;
}

.lms-course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--lms-muted);
}

.lms-badge {
  background: #f2fffb;
  color: #0f7e6b;
  border: 1px solid #c8ece4;
  border-radius: 99px;
  padding: 5px 10px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
}

.lms-categories-panel {
  background: #fff;
  border: 1px solid var(--lms-outline);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(27, 52, 59, 0.08);
}

.lms-categories-panel h3 {
  margin: 2px 0 12px;
  font-size: 22px;
}

.lms-categories-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lms-category-filter li {
  margin: 0;
}

.lms-categories-panel li + li {
  border-top: 1px solid var(--lms-outline);
}

.lms-categories-panel a {
  width: 100%;
  border: 0;
  background: transparent;
  text-decoration: none;
  color: var(--lms-ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 6px;
  font-weight: 600;
  font: inherit;
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
}

.lms-categories-panel a::before {
  content: '›';
  color: var(--lms-primary);
  margin-right: 8px;
  font-weight: 900;
}

.lms-categories-panel a.is-active {
  background: rgba(27, 138, 120, 0.12);
  color: var(--lms-primary);
}

.lms-categories-panel a.is-active small {
  color: var(--lms-primary);
}

.lms-popular-item[hidden] {
  display: none !important;
}

.lms-popular-empty {
  margin: 14px 0 0;
  color: var(--lms-muted);
  font-weight: 600;
}

.lms-course-tile {
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lms-course-tile .lms-course-thumb {
  aspect-ratio: 16 / 10;
}

.lms-course-tile h3,
.lms-course-tile p,
.lms-course-tile .lms-course-meta {
  padding-left: 14px;
  padding-right: 14px;
}

.lms-course-tile h3 {
  margin-top: 14px;
}

.lms-course-tile .lms-course-meta {
  padding-bottom: 14px;
  margin-top: auto;
}

.lms-popular-grid {
  display: flex;
  flex-wrap: wrap;
}

.lms-popular-grid > [class*='col-'] {
  display: flex;
  margin-bottom: 24px;
}

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

@keyframes liftIn {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 991px) {
  .lms-featured-layout,
  .lms-hero-grid,
  .lms-promo-grid,
  .lms-membership-box {
    grid-template-columns: 1fr;
  }

  .lms-featured-grid {
    grid-template-columns: 1fr;
  }

  .lms-review-float {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .lms-review-score {
    border-right: 0;
    border-bottom: 1px solid var(--lms-outline);
    padding-bottom: 10px;
  }

  .lms-courses-grid,
  .lms-popular-split {
    padding-bottom: 40px;
  }
}

@media (max-width: 767px) {
  .lms-hero {
    padding-top: 30px;
  }

  .lms-search {
    grid-template-columns: 1fr;
  }

  .lms-search button {
    height: 44px;
  }

  .lms-hero-actions {
    gap: 8px;
  }

  .lms-btn {
    width: 100%;
  }

  .lms-featured-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .lms-categories-panel button {
    padding-left: 0;
    padding-right: 0;
  }

  .lms-membership-box,
  .lms-sale-note,
  .lms-coupon-card {
    padding: 18px;
  }
}
