/* =========================================================
   CATÁLOGO — SK Wellness Center
   v20260315-6 · limpio, corregido y listo para usar
   ========================================================= */

/* ── Variables locales ─────────────────────────────────── */
:root {
  --cat-gold:        #c9a84c;
  --cat-gold-light:  #edd48e;
  --cat-gold-pale:   #f7efdc;
  --cat-gold-dark:   #9c7426;
  --cat-gold-deep:   #7d5a19;

  --cat-brown:       #2f1f15;
  --cat-brown-soft:  #4a3527;
  --cat-cream:       #fbf8f3;
  --cat-cream-deep:  #f2eadf;
  --cat-white:       #ffffff;

  --cat-text:        #2b1d13;
  --cat-muted:       #7f6554;
  --cat-muted-soft:  #9b7f6b;

  --cat-border:      rgba(107, 76, 56, .11);
  --cat-border-strong: rgba(201, 168, 76, .25);

  --cat-radius-card: 24px;
  --cat-radius-soft: 18px;

  --cat-shadow-sm:   0 8px 22px rgba(43, 29, 19, .05);
  --cat-shadow-md:   0 18px 42px rgba(43, 29, 19, .10);
  --cat-shadow-lg:   0 30px 80px rgba(43, 29, 19, .16);
}

/* ── Sección ───────────────────────────────────────────── */
.catalog {
  position: relative;
  background:
    radial-gradient(circle at top center, rgba(201,168,76,.08), transparent 34%),
    linear-gradient(180deg, #fcfaf6 0%, #f8f3eb 100%);
  padding: 80px 24px 92px;
  border-top: 1px solid rgba(107,76,56,.08);
  overflow: hidden;
}

.catalog::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.42), transparent 22%, transparent 78%, rgba(201,168,76,.04));
  opacity: .8;
}

.catalog .container {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
}

/* ── Encabezado ────────────────────────────────────────── */
.catalog .section-head {
  text-align: center;
  margin-bottom: 42px;
}

.catalog .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(201,168,76,.28);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(201,168,76,.08);
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cat-gold-dark);
  margin-bottom: 18px;
}

.catalog .kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--cat-gold-light), var(--cat-gold));
  box-shadow: 0 0 0 4px rgba(201,168,76,.10);
  flex-shrink: 0;
}

.catalog .section-head h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--cat-brown);
  margin: 0 0 14px;
}

.catalog .section-head .section-sub {
  font-family: 'Manrope', sans-serif;
  font-size: 15.5px;
  color: var(--cat-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.72;
}

/* ── Tabs ──────────────────────────────────────────────── */
.catalog-head.navline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.catalog-head.navline .tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(107,76,56,.13);
  background: rgba(255,255,255,.86);
  box-shadow: 0 8px 18px rgba(43,29,19,.04);
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--cat-brown);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background .22s ease,
    border-color .22s ease,
    color .22s ease,
    box-shadow .22s ease,
    transform .18s ease;
}

.catalog-head.navline .tab:hover {
  transform: translateY(-2px);
  background: var(--cat-gold-pale);
  border-color: rgba(201,168,76,.38);
  box-shadow: 0 10px 22px rgba(201,168,76,.12);
}

.catalog-head.navline .tab.is-active {
  background: linear-gradient(180deg, #3d2a1e 0%, #2a1c12 100%);
  border-color: transparent;
  color: var(--cat-gold-light);
  box-shadow: 0 12px 28px rgba(43,29,19,.18);
}

.catalog-head.navline .tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,168,76,.24);
}

/* ── Grid de tarjetas ──────────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 860px) {
  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 360px) {
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ── Card ──────────────────────────────────────────────── */
.course-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(250,245,237,.98) 100%);
  border: 1px solid var(--cat-border);
  border-radius: var(--cat-radius-card);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--cat-shadow-sm);
  transition:
    transform .24s cubic-bezier(.2,.8,.2,1),
    box-shadow .28s ease,
    border-color .28s ease;
  animation: cardIn .34s ease both;
}

.course-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--cat-radius-card) - 1px);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,0) 26%),
    linear-gradient(180deg, rgba(201,168,76,.06), transparent 28%, transparent 72%, rgba(61,42,30,.03));
  z-index: 0;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.course-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--cat-shadow-md);
  border-color: rgba(201,168,76,.34);
}

.course-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,168,76,.22), var(--cat-shadow-md);
  border-color: rgba(201,168,76,.45);
}

.course-card[hidden] {
  display: none !important;
}

/* ── Thumbnail ─────────────────────────────────────────── */
.course-thumb {
  position: relative;
  z-index: 1;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at top center, rgba(201,168,76,.12), transparent 38%),
    linear-gradient(180deg, #f7f0e6 0%, #efe6d7 100%);
  overflow: hidden;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(107,76,56,.08);
}

.course-thumb::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
  pointer-events: none;
  z-index: 2;
}

.course-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), transparent 28%, transparent 72%, rgba(61,42,30,.16));
  pointer-events: none;
  z-index: 2;
}

.course-thumb img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 12px;
  transition: transform .42s ease;
}

.course-card:hover .course-thumb img {
  transform: scale(1.03);
}

/* ── Body ──────────────────────────────────────────────── */
.course-body {
  position: relative;
  z-index: 1;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 9px;
  flex: 1;
}

.course-body .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: -1;
  margin: 0 auto 2px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(247,239,220,.96));
  color: var(--cat-gold-deep);
  border: 1px solid rgba(201,168,76,.30);
  box-shadow: 0 6px 14px rgba(201,168,76,.09);
  white-space: nowrap;
}

.course-card[data-modalidad="Online"] .course-body .chip {
  background: linear-gradient(180deg, rgba(240,247,255,.95), rgba(227,240,255,.95));
  color: #295a91;
  border-color: rgba(96,143,201,.26);
  box-shadow: 0 6px 14px rgba(96,143,201,.10);
}

.course-body h3 {
  width: 100%;
  margin: 0 auto;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -.01em;
  color: var(--cat-brown);
  text-align: center;
  min-height: calc(1.26em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-body p {
  width: 100%;
  max-width: 94%;
  margin: 0 auto;
  font-family: 'Manrope', sans-serif;
  font-size: 12.4px;
  color: var(--cat-muted);
  line-height: 1.62;
  text-align: center;
  min-height: calc(1.62em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-body .course-cta {
  display: none;
}

.course-card::after {
  content: attr(data-duracion) " · " attr(data-nivel);
  position: relative;
  z-index: 1;
  display: block;
  margin-top: auto;
  padding: 4px 16px 18px;
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--cat-gold-dark);
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .95;
}

/* ── Inline móvil ──────────────────────────────────────── */
.course-inline {
  position: relative;
  grid-column: 1 / -1;
  margin-top: 10px;
  border: 1px solid var(--cat-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,245,237,.98));
  box-shadow: var(--cat-shadow-sm);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .32s ease, opacity .25s ease;
}

.course-inline.is-open {
  opacity: 1;
}

.course-inline__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.course-inline__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.course-inline__heading {
  flex: 1;
  min-width: 0;
}

.course-inline__kicker {
  margin: 0 0 6px;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cat-gold-dark);
}

.course-inline__title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.22;
  color: var(--cat-brown);
}

.course-inline__desc {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: var(--cat-muted);
  line-height: 1.65;
}

.course-inline__meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.course-inline__meta li {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: var(--cat-brown);
  padding: 10px 12px;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--cat-border);
  border-radius: 10px;
}

.course-inline__cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.course-inline__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--cat-border);
  background: var(--cat-white);
  color: var(--cat-brown);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.course-inline__btn:hover {
  transform: translateY(-1px);
}

.course-inline__btn--primary {
  background: linear-gradient(180deg, #3d2a1e 0%, #2a1c12 100%);
  color: var(--cat-gold-light);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(43,29,19,.14);
}

.course-inline__btn--primary:hover {
  background: linear-gradient(180deg, #372518 0%, #26180f 100%);
}

/* botón cerrar inline cuando tu JS lo pinta como botón normal */
.course-inline__btn.js-inline-close {
  background: rgba(255,255,255,.92);
  color: var(--cat-brown);
  border: 1px solid rgba(107,76,56,.14);
  box-shadow: 0 8px 18px rgba(43,29,19,.06);
}

.course-inline__btn.js-inline-close:hover {
  background: var(--cat-gold-pale);
  border-color: rgba(201,168,76,.35);
  box-shadow: 0 10px 20px rgba(201,168,76,.12);
}

/* botón cerrar inline por si después usas icono X */
.course-inline__close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(107,76,56,.14);
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--cat-brown);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(43,29,19,.06);
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.course-inline__close:hover {
  transform: scale(1.06);
  background: var(--cat-gold-pale);
  border-color: rgba(201,168,76,.35);
  box-shadow: 0 10px 20px rgba(201,168,76,.12);
}

.course-inline__close:focus-visible,
.course-inline__btn.js-inline-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,168,76,.22);
}

/* ── Modal ─────────────────────────────────────────────── */
#courseModal.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(27,18,12,.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s ease, visibility .24s ease;
  z-index: 1200;
}

#courseModal.modal-backdrop.is-open,
#courseModal.modal-backdrop[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#courseModal .modal {
  position: relative;
  width: min(640px, 96vw);
  max-height: 92svh;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(250,245,237,.98) 100%);
  border: 1px solid rgba(201,168,76,.20);
  border-radius: 28px;
  box-shadow: var(--cat-shadow-lg);
  overflow-y: auto;
  transform: translateY(16px) scale(.97);
  opacity: 0;
  transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}

#courseModal.is-open .modal,
#courseModal[aria-hidden="false"] .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#courseModal .modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
  background: rgba(251,248,243,.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cat-border);
}

#courseModal .modal-header > div,
#courseModal .modal-heading {
  flex: 1;
  min-width: 0;
}

#courseModal .modal-header .kicker {
  display: inline-block;
  margin: 0 0 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cat-gold-dark);
}

#courseModal #modalTitle {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--cat-brown);
}

#courseModal .modal-close {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--cat-border);
  background: rgba(255,255,255,.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: var(--cat-muted);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(43,29,19,.06);
  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

#courseModal .modal-close:hover {
  background: var(--cat-gold-pale);
  color: var(--cat-brown);
  transform: scale(1.06);
  box-shadow: 0 10px 20px rgba(201,168,76,.12);
}

#courseModal .modal-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,168,76,.22);
}

#courseModal .modal-body {
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#courseModal .modal-desc {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  color: var(--cat-brown-soft);
  line-height: 1.75;
  margin: 0;
}

#courseModal .modal-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

#courseModal .modal-meta li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 13.5px;
  color: var(--cat-brown);
  padding: 11px 14px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--cat-border);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(43,29,19,.03);
}

#courseModal .modal-note {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: var(--cat-muted);
  line-height: 1.7;
  margin: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(247,239,220,.95), rgba(245,236,212,.95));
  border: 1px solid rgba(201,168,76,.18);
  border-radius: 14px;
}

#courseModal .modal-body-cta {
  display: flex;
  align-items: center;
  justify-content: center;
}

#courseModal .modal-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 28px;
  background: linear-gradient(180deg, #2ad46a 0%, #20ba59 100%);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 800;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(37,211,102,.22);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

#courseModal .modal-wa-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #28cc66 0%, #1fae54 100%);
  box-shadow: 0 16px 32px rgba(37,211,102,.26);
}

/* ── Responsive fino ───────────────────────────────────── */
@media (min-width: 769px) {
  .course-inline {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .catalog {
    padding: 72px 18px 84px;
  }

  .catalog .section-head {
    margin-bottom: 34px;
  }

  .catalog .section-head h2 {
    font-size: clamp(28px, 6vw, 38px);
  }

  .catalog .section-head .section-sub {
    font-size: 15px;
  }

  .course-body {
    padding: 16px 14px 14px;
  }

  .course-body h3 {
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .catalog {
    padding: 64px 14px 76px;
  }

  .catalog-head.navline {
    gap: 8px;
    margin-bottom: 26px;
  }

  .catalog-head.navline .tab {
    min-height: 40px;
    padding: 9px 15px;
    font-size: 12px;
  }

  .course-card {
    border-radius: 20px;
  }

  .course-thumb {
    aspect-ratio: 3 / 4.1;
  }

  .course-thumb::before {
    inset: 8px;
    border-radius: 14px;
  }

  .course-thumb img {
    padding: 10px;
  }

  .course-body {
    padding: 15px 12px 14px;
    gap: 8px;
  }

  .course-body .chip {
    font-size: 9.5px;
    padding: 5px 10px;
  }

  .course-body h3 {
    font-size: 14.5px;
    min-height: calc(1.26em * 2);
  }

  .course-body p {
    font-size: 11.8px;
    max-width: 96%;
  }

  .course-card::after {
    font-size: 9.8px;
    padding: 4px 10px 15px;
    letter-spacing: .07em;
  }

  .course-inline__body {
    padding: 16px;
  }

  .course-inline__title {
    font-size: 17px;
  }

  #courseModal .modal-header,
  #courseModal .modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  #courseModal #modalTitle {
    font-size: clamp(20px, 7vw, 24px);
  }

  #courseModal .modal-close {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 22px;
  }
}

@media (max-width: 360px) {
  .course-body h3 {
    font-size: 14px;
  }

  .course-body p {
    font-size: 11.5px;
  }
}

/* ── Reduce motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .course-card,
  .course-thumb img,
  #courseModal .modal,
  #courseModal.modal-backdrop,
  .course-inline,
  .catalog-head.navline .tab,
  #courseModal .modal-wa-btn,
  .course-inline__btn {
    transition: none !important;
    animation: none !important;
  }
}