/* =============================================================
   LP Custom Course Listing v2.0 — Stylesheet
   Colors: Orange #FF8A00 / Navy #1a253f
   ============================================================= */

:root {
  --lpcl-primary:     #FF8A00;
  --lpcl-primary-dk:  #e07b00;
  --lpcl-primary-lt:  #fff4e6;
  --lpcl-navy:        #1a253f;
  --lpcl-navy-lt:     #2d3a5c;
  --lpcl-badge-bg:    #eef0f6;
  --lpcl-badge-txt:   #3a4870;
  --lpcl-text:        #333344;
  --lpcl-muted:       #6b7280;
  --lpcl-border:      #e5e8f0;
  --lpcl-radius:      10px;
  --lpcl-shadow:      0 2px 12px rgba(26,37,63,.08);
  --lpcl-shadow-h:    0 8px 28px rgba(255,138,0,.18);
  --lpcl-font:        'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --lpcl-gap:         22px;
  --lpcl-card-bg:     #ffffff;
  --lpcl-btn-radius:  6px;
  --lpcl-img-height:  220px;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.lpcl-wrapper {
  font-family: var(--lpcl-font);
  color: var(--lpcl-text);
  margin-bottom: 40px;
}

/* ── Archive page wrapper ─────────────────────────────────── */
.lpcl-archive-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  font-family: var(--lpcl-font);
}
.lpcl-archive-header {
  margin-bottom: 36px;
}
.lpcl-archive-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--lpcl-navy);
  margin: 0 0 12px;
  line-height: 1.2;
}
.lpcl-archive-desc {
  font-size: 1rem;
  color: var(--lpcl-muted);
  margin: 12px 0 0;
  line-height: 1.6;
}

/* ── Section ─────────────────────────────────────────────── */
.lpcl-section { padding: 60px 0 40px; background: transparent; }
.lpcl-section__heading { margin-bottom: 36px; }
.lpcl-text-center { text-align: center; }
.lpcl-text-right  { text-align: right; }
.lpcl-text-left   { text-align: left; }
.lpcl-section__title {
  font-size: 2rem; font-weight: 700; color: var(--lpcl-navy); margin: 0 0 10px; line-height: 1.2;
}
.lpcl-section__subtitle { font-size: 1.05rem; color: var(--lpcl-muted); margin: 0 0 16px; }
.lpcl-section__divider {
  display: inline-block; width: 54px; height: 4px; border-radius: 99px;
  background: var(--lpcl-primary); margin-top: 4px;
}

/* ── Filter Bar ───────────────────────────────────────────── */
.lpcl-filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 22px; padding: 14px 18px;
  background: #f7f8fc; border: 1px solid var(--lpcl-border); border-radius: var(--lpcl-radius);
}
.lpcl-filter-group { display: flex; align-items: center; gap: 6px; }
.lpcl-filter-search { flex: 1; min-width: 180px; position: relative; }
.lpcl-filter-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--lpcl-muted); display: flex; pointer-events: none;
}
.lpcl-filter__search {
  width: 100%; padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--lpcl-border); border-radius: 6px;
  font-size: .9rem; background: #fff; color: var(--lpcl-text);
  transition: border-color .2s; outline: none;
}
.lpcl-filter__search:focus { border-color: var(--lpcl-primary); }
.lpcl-filter__select {
  padding: 9px 30px 9px 14px;
  border: 1.5px solid var(--lpcl-border); border-radius: 6px;
  font-size: .9rem; background: #fff; color: var(--lpcl-text);
  outline: none; cursor: pointer; transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.lpcl-filter__select:focus { border-color: var(--lpcl-primary); }
.lpcl-layout-toggle { gap: 4px; }
.lpcl-layout-btn {
  width: 36px; height: 36px; border: 1.5px solid var(--lpcl-border);
  border-radius: 6px; background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--lpcl-muted); transition: all .2s;
}
.lpcl-layout-btn:hover, .lpcl-layout-btn.active {
  border-color: var(--lpcl-primary); color: var(--lpcl-primary); background: var(--lpcl-primary-lt);
}
.lpcl-results-count { margin-left: auto; font-size: .82rem; color: var(--lpcl-muted); white-space: nowrap; }

/* ── Grid ─────────────────────────────────────────────────── */
.lpcl-grid { display: grid; gap: var(--lpcl-gap); align-items: stretch; }
.lpcl-layout-grid.lpcl-cols-1 { grid-template-columns: 1fr; }
.lpcl-layout-grid.lpcl-cols-2 { grid-template-columns: repeat(2, 1fr); }
.lpcl-layout-grid.lpcl-cols-3 { grid-template-columns: repeat(3, 1fr); }
.lpcl-layout-grid.lpcl-cols-4 { grid-template-columns: repeat(4, 1fr); }
.lpcl-layout-list { grid-template-columns: 1fr; }

/* ── Card ─────────────────────────────────────────────────── */
.lpcl-card {
  background: var(--lpcl-card-bg);
  border-radius: var(--lpcl-radius);
  box-shadow: var(--lpcl-shadow);
  border: 1px solid var(--lpcl-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow .25s, transform .25s;
}
.lpcl-card:hover { box-shadow: var(--lpcl-shadow-h); transform: translateY(-4px); }

/* ── Image — fixed height, always covers ─────────────────── */
.lpcl-card__image-wrap {
  display: block;
  overflow: hidden;
  height: var(--lpcl-img-height);   /* fixed 220px */
  width: 100%;
  background: #eee;
  flex-shrink: 0;
}
.lpcl-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* always covers, never distorts */
  object-position: center;
  display: block;
  transition: transform .35s;
}
.lpcl-card:hover .lpcl-card__img { transform: scale(1.04); }
.lpcl-card__img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; background: #f0f2f8;
}
.lpcl-card__img-placeholder svg { width: 100%; height: auto; }

/* ── Card body ────────────────────────────────────────────── */
.lpcl-card__body {
  padding: 20px 20px 12px;
  flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 10px;
}
.lpcl-card__title { font-size: 1.05rem; font-weight: 700; color: var(--lpcl-navy); margin: 0; line-height: 1.35; }
.lpcl-card__title a { color: inherit; text-decoration: none; transition: color .2s; }
.lpcl-card__title a:hover { color: var(--lpcl-primary); }

.lpcl-card__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.lpcl-badge {
  display: inline-block; padding: 3px 11px; font-size: .77rem; font-weight: 600;
  border-radius: 30px; background: var(--lpcl-badge-bg); color: var(--lpcl-badge-txt);
  letter-spacing: .01em; border: 1px solid transparent; transition: background .2s, border-color .2s;
}
.lpcl-badge--delivery { background: var(--lpcl-primary-lt); color: var(--lpcl-primary-dk); }
.lpcl-badge:hover { background: var(--lpcl-primary-lt); border-color: var(--lpcl-primary); color: var(--lpcl-primary-dk); }

.lpcl-card__excerpt {
  font-size: .88rem; color: var(--lpcl-muted); line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Card footer ──────────────────────────────────────────── */
.lpcl-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 18px; border-top: 1px solid var(--lpcl-border); margin-top: auto; gap: 10px;
}
.lpcl-card__price { font-size: 1.1rem; font-weight: 800; color: var(--lpcl-navy); white-space: nowrap; }
.lpcl-price--free { color: #1b8a4a; }

.lpcl-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; background: var(--lpcl-primary); color: #fff !important;
  font-size: .88rem; font-weight: 700; border-radius: var(--lpcl-btn-radius);
  text-decoration: none !important; letter-spacing: .02em;
  border: 2px solid transparent; cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s; white-space: nowrap;
}
.lpcl-btn:hover { background: var(--lpcl-primary-dk); box-shadow: 0 4px 14px rgba(255,138,0,.35); transform: translateY(-1px); }

/* ── List Row ─────────────────────────────────────────────── */
.lpcl-row-item {
  display: flex; gap: 20px; align-items: center;
  background: var(--lpcl-card-bg); border: 1px solid var(--lpcl-border);
  border-radius: var(--lpcl-radius); padding: 18px; box-shadow: var(--lpcl-shadow);
  transition: box-shadow .25s, transform .25s;
}
.lpcl-row-item:hover { box-shadow: var(--lpcl-shadow-h); transform: translateY(-2px); }
.lpcl-row__img-wrap {
  flex-shrink: 0; width: 160px; height: 110px;
  border-radius: 7px; overflow: hidden; display: block; background: #f0f2f8;
}
.lpcl-row__img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.lpcl-row__content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.lpcl-row__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }

/* ── Category Cards ───────────────────────────────────────── */
.lpcl-cat-grid { display: grid; gap: var(--lpcl-gap); }
.lpcl-cat-grid.lpcl-cols-2 { grid-template-columns: repeat(2,1fr); }
.lpcl-cat-grid.lpcl-cols-3 { grid-template-columns: repeat(3,1fr); }
.lpcl-cat-grid.lpcl-cols-4 { grid-template-columns: repeat(4,1fr); }
.lpcl-cat-grid.lpcl-cols-5 { grid-template-columns: repeat(5,1fr); }
.lpcl-cat-grid.lpcl-cols-6 { grid-template-columns: repeat(6,1fr); }
.lpcl-cat-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 28px 18px; background: #fff; border: 1px solid var(--lpcl-border);
  border-radius: var(--lpcl-radius); text-decoration: none !important;
  color: var(--lpcl-text) !important; box-shadow: var(--lpcl-shadow); transition: all .25s;
}
.lpcl-cat-card:hover { border-color: var(--lpcl-primary); box-shadow: var(--lpcl-shadow-h); transform: translateY(-3px); }
.lpcl-cat-card__icon { width: 58px; height: 58px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.lpcl-cat-card__name { font-weight: 700; font-size: .95rem; color: var(--lpcl-navy); }
.lpcl-cat-card__count { font-size: .8rem; color: var(--lpcl-muted); }

/* ── Misc ─────────────────────────────────────────────────── */
.lpcl-featured-wrap { max-width: 380px; }
.lpcl-no-found { grid-column: 1 / -1; text-align: center; color: var(--lpcl-muted); padding: 40px 0; font-size: .95rem; }
.lpcl-grid.is-loading { opacity: .5; pointer-events: none; min-height: 120px; position: relative; }

/* ── LP archive / category page — kill default LP styles ─── */
.learn-press-courses .learn-press-course,
.learn-press .course-item,
.lp-course-items .lp-course-item { display: none !important; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .lpcl-layout-grid.lpcl-cols-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 780px) {
  .lpcl-layout-grid.lpcl-cols-3,
  .lpcl-layout-grid.lpcl-cols-4 { grid-template-columns: repeat(2,1fr); }
  .lpcl-cat-grid.lpcl-cols-4,
  .lpcl-cat-grid.lpcl-cols-5,
  .lpcl-cat-grid.lpcl-cols-6    { grid-template-columns: repeat(2,1fr); }
  .lpcl-row-item                 { flex-wrap: wrap; }
  .lpcl-row__img-wrap            { width: 100%; height: 180px; }
  .lpcl-row__meta                { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  :root { --lpcl-img-height: 190px; }
}
@media (max-width: 520px) {
  .lpcl-layout-grid.lpcl-cols-2,
  .lpcl-layout-grid.lpcl-cols-3,
  .lpcl-layout-grid.lpcl-cols-4 { grid-template-columns: 1fr; }
  .lpcl-cat-grid                 { grid-template-columns: repeat(2,1fr); }
  .lpcl-filters                  { flex-direction: column; }
  .lpcl-filter-search            { min-width: unset; width: 100%; }
  .lpcl-results-count            { margin-left: 0; }
  .lpcl-section__title           { font-size: 1.5rem; }
  :root { --lpcl-img-height: 170px; }
}
